mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 13:27:36 +00:00
(jump-to-register): Take new optional arg NODELETE (prefix arg); pass
through to set-frame-configuration.
This commit is contained in:
parent
68cd265f83
commit
e7683fffbf
1 changed files with 6 additions and 4 deletions
|
|
@ -74,19 +74,21 @@ Argument is a character, naming the register."
|
|||
(set-register char (current-frame-configuration)))
|
||||
|
||||
(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.
|
||||
If the register contains a file name, find that file.
|
||||
\(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
|
||||
configuration (all frames), restore that frame or all frames accordingly.
|
||||
Argument is a character, naming the register."
|
||||
(interactive "cJump to register: ")
|
||||
First argument is a character, naming the 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)))
|
||||
(cond
|
||||
((and (fboundp 'frame-configuration-p)
|
||||
(frame-configuration-p val))
|
||||
(set-frame-configuration val))
|
||||
(set-frame-configuration val nodelete))
|
||||
((window-configuration-p val)
|
||||
(set-window-configuration val))
|
||||
((markerp val)
|
||||
|
|
|
|||
Loading…
Reference in a new issue