mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-11 09:20:51 +00:00
(view-register, insert-register): Handle dead marker.
This commit is contained in:
parent
05041ba0f8
commit
cbd4993c58
@ -144,10 +144,13 @@ REGISTER is a character."
|
|||||||
(princ val))
|
(princ val))
|
||||||
|
|
||||||
((markerp val)
|
((markerp val)
|
||||||
(princ "a buffer position:\nbuffer ")
|
(let ((buf (marker-buffer val)))
|
||||||
(princ (buffer-name (marker-buffer val)))
|
(if (null buf)
|
||||||
(princ ", position ")
|
(princ "a marker in no buffer")
|
||||||
(princ (+ 0 val)))
|
(princ "a buffer position:\nbuffer ")
|
||||||
|
(princ (buffer-name buf))
|
||||||
|
(princ ", position ")
|
||||||
|
(princ (marker-position val)))))
|
||||||
|
|
||||||
((window-configuration-p val)
|
((window-configuration-p val)
|
||||||
(princ "a window configuration."))
|
(princ "a window configuration."))
|
||||||
@ -183,13 +186,17 @@ Interactively, second arg is non-nil if prefix arg is supplied."
|
|||||||
(interactive "cInsert register: \nP")
|
(interactive "cInsert register: \nP")
|
||||||
(push-mark)
|
(push-mark)
|
||||||
(let ((val (get-register char)))
|
(let ((val (get-register char)))
|
||||||
(if (consp val)
|
(cond
|
||||||
(insert-rectangle val)
|
((consp val)
|
||||||
(if (stringp val)
|
(insert-rectangle val))
|
||||||
(insert val)
|
((stringp val)
|
||||||
(if (or (integerp val) (markerp val))
|
(insert val))
|
||||||
(princ (+ 0 val) (current-buffer))
|
((integerp val)
|
||||||
(error "Register does not contain text")))))
|
(princ val (current-buffer)))
|
||||||
|
((and (markerp val) (marker-position val))
|
||||||
|
(princ (marker-position val) (current-buffer)))
|
||||||
|
(t
|
||||||
|
(error "Register does not contain text"))))
|
||||||
(if (not arg) (exchange-point-and-mark)))
|
(if (not arg) (exchange-point-and-mark)))
|
||||||
|
|
||||||
(defun copy-to-register (char start end &optional delete-flag)
|
(defun copy-to-register (char start end &optional delete-flag)
|
||||||
|
Loading…
Reference in New Issue
Block a user