1
0
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:
Karl Heuer 1994-03-14 21:20:25 +00:00
parent 05041ba0f8
commit cbd4993c58

View File

@ -144,10 +144,13 @@ REGISTER is a character."
(princ val))
((markerp val)
(princ "a buffer position:\nbuffer ")
(princ (buffer-name (marker-buffer val)))
(princ ", position ")
(princ (+ 0 val)))
(let ((buf (marker-buffer val)))
(if (null buf)
(princ "a marker in no buffer")
(princ "a buffer position:\nbuffer ")
(princ (buffer-name buf))
(princ ", position ")
(princ (marker-position val)))))
((window-configuration-p val)
(princ "a window configuration."))
@ -183,13 +186,17 @@ Interactively, second arg is non-nil if prefix arg is supplied."
(interactive "cInsert register: \nP")
(push-mark)
(let ((val (get-register char)))
(if (consp val)
(insert-rectangle val)
(if (stringp val)
(insert val)
(if (or (integerp val) (markerp val))
(princ (+ 0 val) (current-buffer))
(error "Register does not contain text")))))
(cond
((consp val)
(insert-rectangle val))
((stringp val)
(insert val))
((integerp val)
(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)))
(defun copy-to-register (char start end &optional delete-flag)