summaryrefslogtreecommitdiff
path: root/lisp/frameset.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2014-03-21 01:03:08 +0100
committerJuanma Barranquero <lekktu@gmail.com>2014-03-21 01:03:08 +0100
commit6ce1b56e2a92232a055fd777378ebdbab8f07d1a (patch)
tree041ed2cdadccb05d85c3d7487a33b4760c195e4a /lisp/frameset.el
parent4539380159e6ed1cd79418bd34e28ebf0485a510 (diff)
downloademacs-6ce1b56e2a92232a055fd777378ebdbab8f07d1a.tar.gz
lisp/frameset.el: Make list-registers a bit more informative.
(frameset--print-register): New function. (frameset-to-register): Use it.
Diffstat (limited to 'lisp/frameset.el')
-rw-r--r--lisp/frameset.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 05fae1b4fa2..3a43f39600c 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -1272,6 +1272,17 @@ Called from `jump-to-register'. Internal use only."
(with-current-buffer buffer (goto-char (aref data 2)))))))
;;;###autoload
+(defun frameset--print-register (data)
+ "Print basic info about frameset stored in DATA.
+Called from `list-registers' and `view-register'. Internal use only."
+ (let* ((fs (aref data 0))
+ (ns (length (frameset-states fs))))
+ (princ (format "a frameset (%d frame%s, saved on %s)."
+ ns
+ (if (= 1 ns) "" "s")
+ (format-time-string "%c" (frameset-timestamp fs))))))
+
+;;;###autoload
(defun frameset-to-register (register)
"Store the current frameset in register REGISTER.
Use \\[jump-to-register] to restore the frameset.
@@ -1288,7 +1299,7 @@ Interactively, reads the register using `register-read-with-preview'."
;; in the current buffer, so record that separately.
(frameset-frame-id nil)
(point-marker))
- :print-func (lambda (_data) (princ "a frameset."))
+ :print-func #'frameset--print-register
:jump-func #'frameset--jump-to-register)))
(provide 'frameset)