Mercurial > emacs
comparison lisp/register.el @ 2202:081afcef5e85
Make frame configurations start with a distinctive symbol.
* frame.el (current-frame-configuration): Return a list as before,
but starting with `frame-configuration'.
(set-frame-configuration): Check that CONFIGURATION is a list
starting with `frame-configuration', strip it off, and do as before.
(frame-configuration-p): New function.
* register.el (jump-to-register): Use frame-configuration-p,
instead of catching an error in set-frame-configuration. Really now.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Mon, 15 Mar 1993 08:51:02 +0000 |
parents | 8ac912d2d369 |
children | 12e9bc8a4a7f |
comparison
equal
deleted
inserted
replaced
2201:bfe994df6c27 | 2202:081afcef5e85 |
---|---|
70 If the register contains a window configuration (one frame) or a frame | 70 If the register contains a window configuration (one frame) or a frame |
71 configuration (all frames), restore that frame or all frames accordingly. | 71 configuration (all frames), restore that frame or all frames accordingly. |
72 Argument is a character, naming the register." | 72 Argument is a character, naming the register." |
73 (interactive "cJump to register: ") | 73 (interactive "cJump to register: ") |
74 (let ((val (get-register char))) | 74 (let ((val (get-register char))) |
75 (condition-case () | 75 (cond |
76 (set-frame-configuration val) | 76 ((frame-configuration-p val) |
77 (error | 77 (set-frame-configuration val)) |
78 (if (window-configuration-p val) | 78 ((window-configuration-p val) |
79 (set-window-configuration val) | 79 (set-window-configuration val)) |
80 (if (markerp val) | 80 ((markerp val) |
81 (progn | 81 (switch-to-buffer (marker-buffer val)) |
82 (switch-to-buffer (marker-buffer val)) | 82 (goto-char val)) |
83 (goto-char val)) | 83 (t |
84 (error "Register doesn't contain a buffer position or configuration"))))))) | 84 (error "Register doesn't contain a buffer position or configuration"))))) |
85 | 85 |
86 ;(defun number-to-register (arg char) | 86 ;(defun number-to-register (arg char) |
87 ; "Store a number in a register. | 87 ; "Store a number in a register. |
88 ;Two args, NUMBER and REGISTER (a character, naming the register). | 88 ;Two args, NUMBER and REGISTER (a character, naming the register). |
89 ;If NUMBER is nil, digits in the buffer following point are read | 89 ;If NUMBER is nil, digits in the buffer following point are read |