From 3365e413bd9cb482849cf48e4f6c366a61326569 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 25 Jan 2023 16:35:37 -0500 Subject: [PATCH 1/3] When base64-decoding part of decrypted text, save the decoding permanently if we save the decryption permanently. (rmail-epa-decode): Take arguments BEG and BACK-FROM-END to designate region. (rmail-epa-decrypt-1): Call rmail-epa-decode from here, when decrypting one encrypted passage. (rmail-epa-decrypt): Not from here. --- lisp/mail/rmail.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 659649b5d42..c56f4ce62dc 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4580,6 +4580,9 @@ Argument MIME is non-nil if this is a mime message." (current-buffer)))) (error nil)) + ;; Decode any base64-encoded material in what we just decrypted. + (rmail-epa-decode armor-start after-end) + (list armor-start (- (point-max) after-end) mime armor-end-regexp (buffer-substring armor-start (- (point-max) after-end))))) @@ -4622,9 +4625,6 @@ Argument MIME is non-nil if this is a mime message." "> ") (push (rmail-epa-decrypt-1 mime) decrypts)))) - ;; Decode any base64-encoded mime sections. - (rmail-epa-decode) - (when (and decrypts (rmail-buffers-swapped-p)) (when (y-or-n-p "Replace the original message? ") (when (eq major-mode 'rmail-mode) @@ -4689,12 +4689,14 @@ Argument MIME is non-nil if this is a mime message." (unless decrypts (error "Nothing to decrypt"))))) -;; Decode all base64-encoded mime sections, so that this change -;; is made in the Rmail file, not just in the viewing buffer. -(defun rmail-epa-decode () +;; Decode all base64-encoded mime sections from BEG to (Z - BACK-FROM-END), +;; so that we save the decoding permanently in the Rmail buffer +;; if we permanently save the decryption. +(defun rmail-epa-decode (beg back-from-end) (save-excursion - (goto-char (point-min)) - (while (re-search-forward "--------------[0-9a-zA-Z]+\n" nil t) + (goto-char beg) + (while (re-search-forward "--------------[0-9a-zA-Z]+\n" + (- (point-max) back-from-end) t) ;; The ending delimiter is a start delimiter if another section follows. ;; Otherwise it is an end delimiter, with -- affixed. (let ((delim (concat (substring (match-string 0) 0 -1) "\\(\\|--\\)\n"))) From fce07d461dec3128c2a3618adbbb4794a45b1fdb Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 26 Jan 2023 08:40:27 +0800 Subject: [PATCH 2/3] Increase DUMPED_HEAP_SIZE * src/w32heap.c (DUMPED_HEAP_SIZE): Add 5 megabytes. --- src/w32heap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/w32heap.c b/src/w32heap.c index a1975d9a975..628fc28e3c5 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -121,9 +121,9 @@ typedef struct _RTL_HEAP_PARAMETERS { # define DUMPED_HEAP_SIZE 10 #else # if defined _WIN64 || defined WIDE_EMACS_INT -# define DUMPED_HEAP_SIZE (23*1024*1024) +# define DUMPED_HEAP_SIZE (28*1024*1024) # else -# define DUMPED_HEAP_SIZE (13*1024*1024) +# define DUMPED_HEAP_SIZE (18*1024*1024) # endif #endif From dfdc0f5fb7b10e737c3c8e2bdb1eb873a1e91bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 26 Jan 2023 12:36:20 +0100 Subject: [PATCH 3/3] Fix xref-clear-marker-stack refactoring mistake * lisp/progmodes/xref.el (xref-clear-marker-stack): Clear the history correctly. Changing a lexical variable has no effect. --- lisp/progmodes/xref.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 916d83d407b..4db0df6c3b8 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -568,7 +568,8 @@ This can be used from `xref-after-jump-hook', for instance.") (dolist (l (list (car history) (cdr history))) (dolist (m l) (set-marker m nil nil))) - (setq history (cons nil nil))) + (setcar history nil) + (setcdr history nil)) nil) ;;;###autoload