diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2014-03-21 01:03:08 +0100 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2014-03-21 01:03:08 +0100 |
commit | 6ce1b56e2a92232a055fd777378ebdbab8f07d1a (patch) | |
tree | 041ed2cdadccb05d85c3d7487a33b4760c195e4a /lisp | |
parent | 4539380159e6ed1cd79418bd34e28ebf0485a510 (diff) | |
download | emacs-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')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/frameset.el | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30e76c013b7..e51a0efd623 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-03-21 Juanma Barranquero <lekktu@gmail.com> + + * frameset.el (frameset--print-register): New function. + (frameset-to-register): Use it. + 2014-03-20 Juanma Barranquero <lekktu@gmail.com> * progmodes/hideif.el (hif-string-to-number): New function. 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) |