* minor
This commit is contained in:
@ -359,7 +359,6 @@ after the end of the search results."
|
|||||||
(defvar mu4e-headers-mode-map nil
|
(defvar mu4e-headers-mode-map nil
|
||||||
"Keymap for *mu4e-headers* buffers.")
|
"Keymap for *mu4e-headers* buffers.")
|
||||||
(unless mu4e-headers-mode-map
|
(unless mu4e-headers-mode-map
|
||||||
|
|
||||||
(setq mu4e-headers-mode-map
|
(setq mu4e-headers-mode-map
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
|
|
||||||
@ -524,8 +523,6 @@ after the end of the search results."
|
|||||||
hl-line-face 'mu4e-header-highlight-face)
|
hl-line-face 'mu4e-header-highlight-face)
|
||||||
(mu4e~mark-initialize) ;; initialize the marking subsystem
|
(mu4e~mark-initialize) ;; initialize the marking subsystem
|
||||||
(hl-line-mode 1)
|
(hl-line-mode 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(setq header-line-format
|
(setq header-line-format
|
||||||
(cons
|
(cons
|
||||||
|
|||||||
@ -75,7 +75,7 @@ where
|
|||||||
(defun mu4e~mark-initialize ()
|
(defun mu4e~mark-initialize ()
|
||||||
"Initialize the marks subsystem."
|
"Initialize the marks subsystem."
|
||||||
(make-local-variable 'mu4e~mark-map)
|
(make-local-variable 'mu4e~mark-map)
|
||||||
(setq mu4e~mark-map (make-hash-table :size 16 :rehash-size 2)))
|
(setq mu4e~mark-map (make-hash-table :size 16)))
|
||||||
|
|
||||||
(defun mu4e~mark-clear ()
|
(defun mu4e~mark-clear ()
|
||||||
"Clear the marks subsystem."
|
"Clear the marks subsystem."
|
||||||
|
|||||||
@ -98,7 +98,7 @@ buffer."
|
|||||||
"The maximum width for images to display; this is only effective
|
"The maximum width for images to display; this is only effective
|
||||||
if you're using an emacs with Imagemagick support."
|
if you're using an emacs with Imagemagick support."
|
||||||
:group 'mu4e-view)
|
:group 'mu4e-view)
|
||||||
|
|
||||||
(defvar mu4e-view-actions
|
(defvar mu4e-view-actions
|
||||||
'( ("capture message" . mu4e-action-capture-message)
|
'( ("capture message" . mu4e-action-capture-message)
|
||||||
("view as pdf" . mu4e-action-view-as-pdf))
|
("view as pdf" . mu4e-action-view-as-pdf))
|
||||||
@ -139,7 +139,7 @@ where:
|
|||||||
"\\(\\(https?\\://\\|mailto:\\)[-+a-zA-Z0-9.?_$%/+&#@!~,:;=/()]+\\)"
|
"\\(\\(https?\\://\\|mailto:\\)[-+a-zA-Z0-9.?_$%/+&#@!~,:;=/()]+\\)"
|
||||||
"Regexp that matches http:/https:/mailto: URLs; match-string 1
|
"Regexp that matches http:/https:/mailto: URLs; match-string 1
|
||||||
will contain the matched URL, if any.")
|
will contain the matched URL, if any.")
|
||||||
|
|
||||||
(defvar mu4e~view-attach-map nil
|
(defvar mu4e~view-attach-map nil
|
||||||
"A mapping of user-visible attachment number to the actual part index.")
|
"A mapping of user-visible attachment number to the actual part index.")
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -225,7 +225,6 @@ marking if it still had that."
|
|||||||
(mu4e~view-fontify-cited)
|
(mu4e~view-fontify-cited)
|
||||||
(mu4e~view-fontify-footer)
|
(mu4e~view-fontify-footer)
|
||||||
(mu4e~view-make-urls-clickable)
|
(mu4e~view-make-urls-clickable)
|
||||||
|
|
||||||
(mu4e~view-show-images-maybe msg)
|
(mu4e~view-show-images-maybe msg)
|
||||||
|
|
||||||
(unless refresh
|
(unless refresh
|
||||||
@ -296,7 +295,7 @@ is nil, and otherwise open it."
|
|||||||
(:index 2 :name \"test456.pdf\"
|
(:index 2 :name \"test456.pdf\"
|
||||||
:mime-type \"application/pdf\" :attachment t :size 12234))."
|
:mime-type \"application/pdf\" :attachment t :size 12234))."
|
||||||
(setq mu4e~view-attach-map ;; buffer local
|
(setq mu4e~view-attach-map ;; buffer local
|
||||||
(make-hash-table :size 16 :rehash-size 2 :weakness nil))
|
(make-hash-table :size 64 :weakness nil))
|
||||||
(let* ((id 0)
|
(let* ((id 0)
|
||||||
(attachments
|
(attachments
|
||||||
;; we only list parts that look like attachments, ie. that have a
|
;; we only list parts that look like attachments, ie. that have a
|
||||||
@ -427,14 +426,14 @@ is nil, and otherwise open it."
|
|||||||
(define-key map (kbd "D") 'mu4e-view-mark-for-delete)
|
(define-key map (kbd "D") 'mu4e-view-mark-for-delete)
|
||||||
(define-key map (kbd "m") 'mu4e-view-mark-for-move)
|
(define-key map (kbd "m") 'mu4e-view-mark-for-move)
|
||||||
(define-key map (kbd "&") 'mu4e-view-mark-custom)
|
(define-key map (kbd "&") 'mu4e-view-mark-custom)
|
||||||
|
|
||||||
(define-key map (kbd "+") 'mu4e-view-mark-flag)
|
(define-key map (kbd "+") 'mu4e-view-mark-flag)
|
||||||
(define-key map (kbd "-") 'mu4e-view-mark-unflag)
|
(define-key map (kbd "-") 'mu4e-view-mark-unflag)
|
||||||
|
|
||||||
(define-key map (kbd "*") 'mu4e-view-mark-deferred)
|
(define-key map (kbd "*") 'mu4e-view-mark-deferred)
|
||||||
(define-key map (kbd "<kp-multiply>") 'mu4e-view-mark-deferred)
|
(define-key map (kbd "<kp-multiply>") 'mu4e-view-mark-deferred)
|
||||||
(define-key map (kbd "#") 'mu4e-mark-resolve-deferred-marks)
|
(define-key map (kbd "#") 'mu4e-mark-resolve-deferred-marks)
|
||||||
|
|
||||||
;; misc
|
;; misc
|
||||||
(define-key map "w" 'mu4e-view-toggle-wrap-lines)
|
(define-key map "w" 'mu4e-view-toggle-wrap-lines)
|
||||||
(define-key map "h" 'mu4e-view-toggle-hide-cited)
|
(define-key map "h" 'mu4e-view-toggle-hide-cited)
|
||||||
@ -522,7 +521,7 @@ is nil, and otherwise open it."
|
|||||||
|
|
||||||
(make-local-variable 'mu4e~view-lines-wrapped)
|
(make-local-variable 'mu4e~view-lines-wrapped)
|
||||||
(make-local-variable 'mu4e~view-cited-hidden)
|
(make-local-variable 'mu4e~view-cited-hidden)
|
||||||
|
|
||||||
(setq buffer-undo-list t) ;; don't record undo info
|
(setq buffer-undo-list t) ;; don't record undo info
|
||||||
|
|
||||||
;; autopair mode gives error when pressing RET
|
;; autopair mode gives error when pressing RET
|
||||||
@ -601,7 +600,7 @@ browser is called is depending on `browse-url-browser-function' and
|
|||||||
(lambda ()
|
(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(browse-url url))))))
|
(browse-url url))))))
|
||||||
|
|
||||||
(defun mu4e~view-show-images-maybe (msg)
|
(defun mu4e~view-show-images-maybe (msg)
|
||||||
"Show attached images, if `mu4e-view-show-images' is non-nil."
|
"Show attached images, if `mu4e-view-show-images' is non-nil."
|
||||||
(when (and (display-images-p) mu4e-view-show-images)
|
(when (and (display-images-p) mu4e-view-show-images)
|
||||||
@ -621,7 +620,7 @@ number them so they can be opened using `mu4e-view-go-to-url'."
|
|||||||
(let ((num 0))
|
(let ((num 0))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(setq mu4e~view-link-map ;; buffer local
|
(setq mu4e~view-link-map ;; buffer local
|
||||||
(make-hash-table :size 32 :rehash-size 2 :weakness nil))
|
(make-hash-table :size 32 :weakness nil))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward mu4e~view-url-regexp nil t)
|
(while (re-search-forward mu4e~view-url-regexp nil t)
|
||||||
(let ((url (match-string 0))
|
(let ((url (match-string 0))
|
||||||
@ -1055,7 +1054,7 @@ ensure we don't disturb other windows."
|
|||||||
(and
|
(and
|
||||||
(eq curbuf (window-buffer win)) ;; does win show curbuf?
|
(eq curbuf (window-buffer win)) ;; does win show curbuf?
|
||||||
(not (eq curwin win)) ;; but it's not the curwin?
|
(not (eq curwin win)) ;; but it's not the curwin?
|
||||||
(not (one-window-p))) ;; and not the last one on the frame?
|
(not (one-window-p))) ;; and not the last one on the frame?
|
||||||
(delete-window win)))) ;; delete it!
|
(delete-window win)))) ;; delete it!
|
||||||
;; now, all *other* windows should be gone.
|
;; now, all *other* windows should be gone.
|
||||||
;; if the headers view is also visible, kill ourselves + window; otherwise
|
;; if the headers view is also visible, kill ourselves + window; otherwise
|
||||||
@ -1069,7 +1068,7 @@ ensure we don't disturb other windows."
|
|||||||
(progn
|
(progn
|
||||||
(kill-buffer)
|
(kill-buffer)
|
||||||
(when (buffer-live-p mu4e~view-headers-buffer)
|
(when (buffer-live-p mu4e~view-headers-buffer)
|
||||||
(switch-to-buffer mu4e~view-headers-buffer))))))
|
(switch-to-buffer mu4e~view-headers-buffer))))))
|
||||||
|
|
||||||
(provide 'mu4e-view)
|
(provide 'mu4e-view)
|
||||||
;; end of mu4e-view
|
;; end of mu4e-view
|
||||||
|
|||||||
Reference in New Issue
Block a user