[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vm 93559506ff 2/4: Merge branch 'fix-475' into 'main'
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vm 93559506ff 2/4: Merge branch 'fix-475' into 'main' |
Date: |
Mon, 22 Jul 2024 19:00:49 -0400 (EDT) |
branch: elpa/vm
commit 93559506ff873a12a3b74c11b43d0485cc7e4ffb
Merge: 89cfe9aa55 4a699b0864
Author: Mark Diekhans <markd@ucsc.edu>
Commit: Mark Diekhans <markd@ucsc.edu>
Merge branch 'fix-475' into 'main'
Try and fix issue #475 (consequence of `lexical-binding`)
Closes #475
See merge request emacs-vm/vm!17
---
lisp/vm-imap.el | 11 ++++++-----
lisp/vm-window.el | 34 +++++++++++++++++++++-------------
lisp/vm.el | 2 ++
3 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/lisp/vm-imap.el b/lisp/vm-imap.el
index e5b4988ca6..5246bb6313 100644
--- a/lisp/vm-imap.el
+++ b/lisp/vm-imap.el
@@ -1904,7 +1904,7 @@ available for the IMAP server."
(if vm-imap-read-point
(progn
(vm-set-imap-status-got statblob (- end ***start))
- (if (zerop (% (random) 10))
+ (if (zerop (random 10))
(vm-imap-report-retrieval-status statblob)))))))
;; this seems to slow things down. USR, 2008-04-25
;; reenabled. USR, 2010-09-17
@@ -1994,10 +1994,11 @@ available for the IMAP server."
;; the CRLF or the LF newline convention is used on the inbox
;; associated with this crashbox. This setting assumes the LF
;; newline convention is used.
- (defvar buffer-file-type) ;; FIXME: Removed in Emacs-24.4.
- (let ((buffer-file-type t)
- (selective-display nil))
- (write-region ***start end target t 0))
+ (progn
+ (defvar buffer-file-type) ;; FIXME: Removed in Emacs-24.4.
+ (let ((buffer-file-type t)
+ (selective-display nil))
+ (write-region ***start end target t 0)))
(let ((b (current-buffer)))
(with-current-buffer target
;;----------------------------
diff --git a/lisp/vm-window.el b/lisp/vm-window.el
index 61baa93850..bf77aaee3d 100644
--- a/lisp/vm-window.el
+++ b/lisp/vm-window.el
@@ -225,18 +225,26 @@
(or summary (setq summary (or vm-summary-buffer nonexistent-summary)))
(or composition (setq composition nonexistent))
(or edit (setq edit nonexistent))
- (tapestry-replace-tapestry-element (nth 1 config) 'buffer-name
- (function
- (lambda (x)
- (if (symbolp x)
- (symbol-value x)
- (if (and (stringp x)
- (get-buffer x)
- (zerop
- (with-current-buffer x
- (buffer-size))))
- nonexistent
- x )))))
+ (let ((label-to-buffer ;; The reverse of `vm-buffer-to-label'.
+ (lambda (label)
+ (cl-ecase label
+ (summary summary)
+ (folders-summary folders-summary)
+ (composition composition)
+ (message message)
+ (edit edit)))))
+ (tapestry-replace-tapestry-element (nth 1 config) 'buffer-name
+ (function
+ (lambda (x)
+ (if (symbolp x)
+ (funcall label-to-buffer x)
+ (if (and (stringp x)
+ (get-buffer x)
+ (zerop
+ (with-current-buffer x
+ (buffer-size))))
+ nonexistent
+ x ))))))
(set-tapestry (nth 1 config) 1)
(and (get-buffer nonexistent)
(vm-maybe-delete-windows-or-frames-on nonexistent))
@@ -292,7 +300,7 @@ window configurations."
;; "unreadable" read syntax appearing in the window
;; configuration file by way of frame-parameters.
(setcar map nil)
- (tapestry-replace-tapestry-element map 'buffer-name 'vm-buffer-to-label)
+ (tapestry-replace-tapestry-element map 'buffer-name #'vm-buffer-to-label)
(tapestry-nullify-tapestry-elements map t nil t t t nil)
(setq p (assq tag vm-window-configurations))
(if p
diff --git a/lisp/vm.el b/lisp/vm.el
index 7090642279..c02804d897 100644
--- a/lisp/vm.el
+++ b/lisp/vm.el
@@ -1387,6 +1387,8 @@ summary buffer to select a folder."
(setq varlist (apropos-internal "^\\(vm\\|vmpc\\)-" 'custom-variable-p))
(setq varlist (vm-delete
(lambda (v)
+ ;; FIXME: `standard-value' stores an *expression*
+ ;; whose value is the default value!
(equal (symbol-value v) (car (get v 'standard-value))))
varlist))
(setq varlist (sort varlist