Commit 6ce1b56e authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

lisp/frameset.el: Make list-registers a bit more informative.

(frameset--print-register): New function.
(frameset-to-register): Use it.
parent 45393801
2014-03-21 Juanma Barranquero <>
* frameset.el (frameset--print-register): New function.
(frameset-to-register): Use it.
2014-03-20 Juanma Barranquero <>
* progmodes/hideif.el (hif-string-to-number): New function.
......@@ -1271,6 +1271,17 @@ Called from `jump-to-register'. Internal use only."
(set-frame-selected-window frame window)
(with-current-buffer buffer (goto-char (aref data 2)))))))
(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)."
(if (= 1 ns) "" "s")
(format-time-string "%c" (frameset-timestamp fs))))))
(defun frameset-to-register (register)
"Store the current frameset in register REGISTER.
......@@ -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)
:print-func (lambda (_data) (princ "a frameset."))
:print-func #'frameset--print-register
:jump-func #'frameset--jump-to-register)))
(provide 'frameset)
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