chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
66cffbd
)
el/dot-emacs.el (mdw-switch-window-configuration): Print a message afterwards.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 2 May 2022 13:42:51 +0000
(14:42 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 2 May 2022 13:43:11 +0000
(14:43 +0100)
el/dot-emacs.el
patch
|
blob
|
blame
|
history
diff --git
a/el/dot-emacs.el
b/el/dot-emacs.el
index 09b77085f35fa99a6271ba3c2fb464b5b0abee26..9088736fcd183a9c504756dd9b20cbcb456c4d42 100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-319,13
+319,17
@@
(defun mdw-switch-window-configuration (register &optional no-save)
(or (and (consp arg) (= (car arg) 4) (= (car arg) 64))
(and (integerp arg) (not (zerop (logand arg 1))))))))
(or (and (consp arg) (= (car arg) 4) (= (car arg) 64))
(and (integerp arg) (not (zerop (logand arg 1))))))))
- (let ((current-windows (list (current-window-configuration)
+ (let ((previous mdw-current-window-configuration)
+ (current-windows (list (current-window-configuration)
(point-marker)))
(register-value (and register (get-register register))))
(when (and mdw-current-window-configuration (not no-save))
(set-register mdw-current-window-configuration current-windows))
(cond ((null register)
(point-marker)))
(register-value (and register (get-register register))))
(when (and mdw-current-window-configuration (not no-save))
(set-register mdw-current-window-configuration current-windows))
(cond ((null register)
- (setq mdw-current-window-configuration nil))
+ (setq mdw-current-window-configuration nil)
+ (if previous
+ (message "Left window configuration `%c'." previous)
+ (message "Nothing to do!")))
((not (or (null register-value)
(and (consp register-value)
(window-configuration-p (car register-value))
((not (or (null register-value)
(and (consp register-value)
(window-configuration-p (car register-value))
@@
-334,10
+338,14
@@
(defun mdw-switch-window-configuration (register &optional no-save)
(error "Register `%c' is not a window configuration" register))
(t
(cond ((null register-value)
(error "Register `%c' is not a window configuration" register))
(t
(cond ((null register-value)
- (set-register register current-windows))
+ (set-register register current-windows)
+ (message "Started new window configuration `%c'."
+ register))
(t
(set-window-configuration (car register-value))
(t
(set-window-configuration (car register-value))
- (goto-char (cadr register-value))))
+ (goto-char (cadr register-value))
+ (message "Switched to window configuration `%c'."
+ register)))
(setq mdw-current-window-configuration register)))))
;; Don't raise windows unless I say so.
(setq mdw-current-window-configuration register)))))
;; Don't raise windows unless I say so.