mirror of
https://github.com/larstvei/dot-emacs.git
synced 2024-11-26 07:28:31 +00:00
Bug fix. Remove advice and replace it with a function.
This commit is contained in:
parent
5c0ca0e4c4
commit
1ed5dcc7c3
21
init.el
21
init.el
@ -181,7 +181,7 @@ PACKAGE is installed and the current version is deleted."
|
||||
calendar-longitude 10.7
|
||||
calendar-location-name "Oslo, Norway")
|
||||
|
||||
(let ((load-mail-setup t))
|
||||
(let ((load-mail-setup nil))
|
||||
(when load-mail-setup
|
||||
;; Dependent on both mu4e and smtpmail (for sending only).
|
||||
(require 'mu4e)
|
||||
@ -197,6 +197,7 @@ PACKAGE is installed and the current version is deleted."
|
||||
mu4e-view-show-images t ; view images
|
||||
mu4e-html2text-command
|
||||
"html2text -utf8" ; use utf-8
|
||||
mu4e-compose-signature "- Lars" ; Sign my name
|
||||
)
|
||||
|
||||
;; Setup for sending mail.
|
||||
@ -216,9 +217,14 @@ PACKAGE is installed and the current version is deleted."
|
||||
(when (fboundp 'imagemagick-register-types)
|
||||
(imagemagick-register-types))
|
||||
|
||||
;; Overwrite the native 'compose-mail' binding to 'mu4e'.
|
||||
(global-set-key (kbd "C-x m") 'mu4e)
|
||||
))
|
||||
;; A function to show mu4e and nothing else!
|
||||
(defun show-mu4e ()
|
||||
(interactive)
|
||||
(mu4e)
|
||||
(delete-other-windows))
|
||||
|
||||
;; Overwrite the native 'compose-mail' binding to 'show-mu4e'.
|
||||
(global-set-key (kbd "C-x m") 'show-mu4e)))
|
||||
|
||||
(add-hook 'text-mode-hook 'turn-on-flyspell)
|
||||
|
||||
@ -271,13 +277,6 @@ PACKAGE is installed and the current version is deleted."
|
||||
(whitespace-cleanup)
|
||||
(untabify beg (if (< end (point-max)) end (point-max)))))
|
||||
|
||||
(defadvice mu4e (after show-only-mu4e (background) activate)
|
||||
"When evoking the mu4e command, delete all other windows. If
|
||||
BACKGROUND is non-nil we don't want to change the functions
|
||||
behaviour."
|
||||
(unless background
|
||||
(delete-other-windows)))
|
||||
|
||||
(global-set-key (kbd "C-'") 'er/expand-region)
|
||||
(global-set-key (kbd "C-;") 'er/contract-region)
|
||||
|
||||
|
26
init.org
26
init.org
@ -370,7 +370,7 @@
|
||||
a =non-nil= value mail is setup.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
(let ((load-mail-setup t))
|
||||
(let ((load-mail-setup nil))
|
||||
(when load-mail-setup
|
||||
;; Dependent on both mu4e and smtpmail (for sending only).
|
||||
(require 'mu4e)
|
||||
@ -386,6 +386,7 @@
|
||||
mu4e-view-show-images t ; view images
|
||||
mu4e-html2text-command
|
||||
"html2text -utf8" ; use utf-8
|
||||
mu4e-compose-signature "- Lars" ; Sign my name
|
||||
)
|
||||
|
||||
;; Setup for sending mail.
|
||||
@ -405,9 +406,14 @@
|
||||
(when (fboundp 'imagemagick-register-types)
|
||||
(imagemagick-register-types))
|
||||
|
||||
;; Overwrite the native 'compose-mail' binding to 'mu4e'.
|
||||
(global-set-key (kbd "C-x m") 'mu4e)
|
||||
))
|
||||
;; A function to show mu4e and nothing else!
|
||||
(defun show-mu4e ()
|
||||
(interactive)
|
||||
(mu4e)
|
||||
(delete-other-windows))
|
||||
|
||||
;; Overwrite the native 'compose-mail' binding to 'show-mu4e'.
|
||||
(global-set-key (kbd "C-x m") 'show-mu4e)))
|
||||
#+END_SRC
|
||||
|
||||
** Flyspell
|
||||
@ -514,18 +520,6 @@
|
||||
(untabify beg (if (< end (point-max)) end (point-max)))))
|
||||
#+END_SRC
|
||||
|
||||
When browsing mail with =mu4e= I find it best not to have other windows
|
||||
visible.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
(defadvice mu4e (after show-only-mu4e (background) activate)
|
||||
"When evoking the mu4e command, delete all other windows. If
|
||||
BACKGROUND is non-nil we don't want to change the functions
|
||||
behaviour."
|
||||
(unless background
|
||||
(delete-other-windows)))
|
||||
#+END_SRC
|
||||
|
||||
** Key bindings
|
||||
|
||||
Bindings for [[https://github.com/magnars/expand-region.el][expand-region]].
|
||||
|
Loading…
Reference in New Issue
Block a user