mirror of
https://github.com/djcb/mu.git
synced 2024-06-26 07:29:17 +02:00
Merge pull request #1520 from antoine-levitt/beg-end-buf
mu4e/compose: Push mark on beginning/end of buffer
This commit is contained in:
commit
9d6f51b769
|
@ -900,11 +900,17 @@ buffer buried."
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defun mu4e-compose-goto-top ()
|
(defun mu4e-compose-goto-top (&optional arg)
|
||||||
"Go to the beginning of the message or buffer.
|
"Go to the beginning of the message or buffer.
|
||||||
Go to the beginning of the message or, if already there, go to the
|
Go to the beginning of the message or, if already there, go to the
|
||||||
beginning of the buffer."
|
beginning of the buffer.
|
||||||
(interactive)
|
|
||||||
|
Push mark at previous position, unless either a \\[universal-argument] prefix
|
||||||
|
is supplied, or Transient Mark mode is enabled and the mark is active."
|
||||||
|
(interactive "P")
|
||||||
|
(or arg
|
||||||
|
(region-active-p)
|
||||||
|
(push-mark))
|
||||||
(let ((old-position (point)))
|
(let ((old-position (point)))
|
||||||
(message-goto-body)
|
(message-goto-body)
|
||||||
(when (equal (point) old-position)
|
(when (equal (point) old-position)
|
||||||
|
@ -913,11 +919,17 @@ beginning of the buffer."
|
||||||
(define-key mu4e-compose-mode-map
|
(define-key mu4e-compose-mode-map
|
||||||
(vector 'remap 'beginning-of-buffer) 'mu4e-compose-goto-top)
|
(vector 'remap 'beginning-of-buffer) 'mu4e-compose-goto-top)
|
||||||
|
|
||||||
(defun mu4e-compose-goto-bottom ()
|
(defun mu4e-compose-goto-bottom (&optional arg)
|
||||||
"Go to the end of the message or buffer.
|
"Go to the end of the message or buffer.
|
||||||
Go to the end of the message (before signature) or, if already there, go to the
|
Go to the end of the message (before signature) or, if already there, go to the
|
||||||
end of the buffer."
|
end of the buffer.
|
||||||
(interactive)
|
|
||||||
|
Push mark at previous position, unless either a \\[universal-argument] prefix
|
||||||
|
is supplied, or Transient Mark mode is enabled and the mark is active."
|
||||||
|
(interactive "P")
|
||||||
|
(or arg
|
||||||
|
(region-active-p)
|
||||||
|
(push-mark))
|
||||||
(let ((old-position (point))
|
(let ((old-position (point))
|
||||||
(message-position (save-excursion (message-goto-body) (point))))
|
(message-position (save-excursion (message-goto-body) (point))))
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user