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
5e35912b49
19
init.el
19
init.el
@ -197,6 +197,7 @@ PACKAGE is installed and the current version is deleted."
|
|||||||
mu4e-view-show-images t ; view images
|
mu4e-view-show-images t ; view images
|
||||||
mu4e-html2text-command
|
mu4e-html2text-command
|
||||||
"html2text -utf8" ; use utf-8
|
"html2text -utf8" ; use utf-8
|
||||||
|
mu4e-compose-signature "- Lars" ; Sign my name
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Setup for sending mail.
|
;; Setup for sending mail.
|
||||||
@ -216,9 +217,14 @@ PACKAGE is installed and the current version is deleted."
|
|||||||
(when (fboundp 'imagemagick-register-types)
|
(when (fboundp 'imagemagick-register-types)
|
||||||
(imagemagick-register-types))
|
(imagemagick-register-types))
|
||||||
|
|
||||||
;; Overwrite the native 'compose-mail' binding to 'mu4e'.
|
;; A function to show mu4e and nothing else!
|
||||||
(global-set-key (kbd "C-x m") 'mu4e)
|
(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)
|
(add-hook 'text-mode-hook 'turn-on-flyspell)
|
||||||
|
|
||||||
@ -271,13 +277,6 @@ PACKAGE is installed and the current version is deleted."
|
|||||||
(whitespace-cleanup)
|
(whitespace-cleanup)
|
||||||
(untabify beg (if (< end (point-max)) end (point-max)))))
|
(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/expand-region)
|
||||||
(global-set-key (kbd "C-;") 'er/contract-region)
|
(global-set-key (kbd "C-;") 'er/contract-region)
|
||||||
|
|
||||||
|
24
init.org
24
init.org
@ -386,6 +386,7 @@
|
|||||||
mu4e-view-show-images t ; view images
|
mu4e-view-show-images t ; view images
|
||||||
mu4e-html2text-command
|
mu4e-html2text-command
|
||||||
"html2text -utf8" ; use utf-8
|
"html2text -utf8" ; use utf-8
|
||||||
|
mu4e-compose-signature "- Lars" ; Sign my name
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Setup for sending mail.
|
;; Setup for sending mail.
|
||||||
@ -405,9 +406,14 @@
|
|||||||
(when (fboundp 'imagemagick-register-types)
|
(when (fboundp 'imagemagick-register-types)
|
||||||
(imagemagick-register-types))
|
(imagemagick-register-types))
|
||||||
|
|
||||||
;; Overwrite the native 'compose-mail' binding to 'mu4e'.
|
;; A function to show mu4e and nothing else!
|
||||||
(global-set-key (kbd "C-x m") 'mu4e)
|
(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
|
#+END_SRC
|
||||||
|
|
||||||
** Flyspell
|
** Flyspell
|
||||||
@ -514,18 +520,6 @@
|
|||||||
(untabify beg (if (< end (point-max)) end (point-max)))))
|
(untabify beg (if (< end (point-max)) end (point-max)))))
|
||||||
#+END_SRC
|
#+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
|
** Key bindings
|
||||||
|
|
||||||
Bindings for [[https://github.com/magnars/expand-region.el][expand-region]].
|
Bindings for [[https://github.com/magnars/expand-region.el][expand-region]].
|
||||||
|
Loading…
Reference in New Issue
Block a user