Emacs: Use 'with-editor-mode' for Mutt messages, move to text area in mail-mode
parent
76df272c35
commit
e655b1433d
|
@ -210,17 +210,6 @@
|
||||||
(setq calendar-week-start-day 1)
|
(setq calendar-week-start-day 1)
|
||||||
(setq calendar-date-style 'iso)
|
(setq calendar-date-style 'iso)
|
||||||
|
|
||||||
;; Remove auto-fill in web edits because wikis and forums do not like it.
|
|
||||||
;; This works for qutebrowser, but may need changes for other browsers.
|
|
||||||
(add-hook
|
|
||||||
'find-file-hook
|
|
||||||
(lambda ()
|
|
||||||
(when (string-match (concat (getenv "BROWSER") "-editor-*") (buffer-name))
|
|
||||||
(when (require 'with-editor nil t)
|
|
||||||
;; Just like git commits.
|
|
||||||
(with-editor-mode))
|
|
||||||
(auto-fill-mode -1))))
|
|
||||||
|
|
||||||
;; Compilation bindings and conveniences.
|
;; Compilation bindings and conveniences.
|
||||||
(setq compilation-ask-about-save nil)
|
(setq compilation-ask-about-save nil)
|
||||||
(eval-after-load 'compile
|
(eval-after-load 'compile
|
||||||
|
@ -301,8 +290,26 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(setq indent-tabs-mode nil)))
|
(setq indent-tabs-mode nil)))
|
||||||
|
|
||||||
|
;; Remove auto-fill in web edits because wikis and forums do not like it.
|
||||||
|
;; This works for qutebrowser, but may need changes for other browsers.
|
||||||
|
(add-hook
|
||||||
|
'find-file-hook
|
||||||
|
(lambda ()
|
||||||
|
(when (string-match (concat (getenv "BROWSER") "-editor-*") (buffer-name))
|
||||||
|
(when (require 'with-editor nil t)
|
||||||
|
;; Just like git commits.
|
||||||
|
(with-editor-mode))
|
||||||
|
(auto-fill-mode -1))))
|
||||||
|
|
||||||
;; Mutt support.
|
;; Mutt support.
|
||||||
(add-to-list 'auto-mode-alist '("/tmp/mutt.*" . mail-mode))
|
(add-to-list 'auto-mode-alist '("/tmp/mutt-.*" . mail-mode))
|
||||||
|
(add-hook
|
||||||
|
'find-file-hook
|
||||||
|
(lambda ()
|
||||||
|
(when (and (string-match "/tmp/mutt-.*" (buffer-file-name))
|
||||||
|
(require 'with-editor nil t))
|
||||||
|
;; Just like git commits.
|
||||||
|
(with-editor-mode))))
|
||||||
|
|
||||||
;; Arch Linux PKGBUILD.
|
;; Arch Linux PKGBUILD.
|
||||||
(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode))
|
(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode))
|
||||||
|
@ -310,6 +317,10 @@
|
||||||
;; Subtitles support.
|
;; Subtitles support.
|
||||||
(add-to-list 'auto-mode-alist '("\\.srt\\'" . text-mode))
|
(add-to-list 'auto-mode-alist '("\\.srt\\'" . text-mode))
|
||||||
|
|
||||||
|
(add-hook
|
||||||
|
'mail-mode-hook
|
||||||
|
'mail-text)
|
||||||
|
|
||||||
;; Easy code folding toggle.
|
;; Easy code folding toggle.
|
||||||
; (add-hook 'prog-mode-hook 'hs-minor-mode)
|
; (add-hook 'prog-mode-hook 'hs-minor-mode)
|
||||||
; (add-hook 'prog-mode-hook (lambda () (local-set-key (kbd "C-c h") 'hs-toggle-hiding)))
|
; (add-hook 'prog-mode-hook (lambda () (local-set-key (kbd "C-c h") 'hs-toggle-hiding)))
|
||||||
|
|
Loading…
Reference in New Issue