Commit e7683fff authored by Roland McGrath's avatar Roland McGrath
Browse files

(jump-to-register): Take new optional arg NODELETE (prefix arg); pass

through to set-frame-configuration.
parent 68cd265f
...@@ -74,19 +74,21 @@ Argument is a character, naming the register." ...@@ -74,19 +74,21 @@ Argument is a character, naming the register."
(set-register char (current-frame-configuration))) (set-register char (current-frame-configuration)))
(defalias 'register-to-point 'jump-to-register) (defalias 'register-to-point 'jump-to-register)
(defun jump-to-register (char) (defun jump-to-register (char &optional nodelete)
"Move point to location stored in a register. "Move point to location stored in a register.
If the register contains a file name, find that file. If the register contains a file name, find that file.
\(To put a file name in a register, you must use `set-register'.) \(To put a file name in a register, you must use `set-register'.)
If the register contains a window configuration (one frame) or a frame If the register contains a window configuration (one frame) or a frame
configuration (all frames), restore that frame or all frames accordingly. configuration (all frames), restore that frame or all frames accordingly.
Argument is a character, naming the register." First argument is a character, naming the register.
(interactive "cJump to register: ") Optional second arg non-nil (interactively, prefix argument) says not to
delete any existing frames when restoring a frame configuration."
(interactive "cJump to register: \nP")
(let ((val (get-register char))) (let ((val (get-register char)))
(cond (cond
((and (fboundp 'frame-configuration-p) ((and (fboundp 'frame-configuration-p)
(frame-configuration-p val)) (frame-configuration-p val))
(set-frame-configuration val)) (set-frame-configuration val nodelete))
((window-configuration-p val) ((window-configuration-p val)
(set-window-configuration val)) (set-window-configuration val))
((markerp val) ((markerp val)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment