GNU bug report logs - #22616
25.0.50; Change to lm-header breaks lm-header-multiline

Previous Next

Package: emacs;

Reported by: Jonas Bernoulli <jonas <at> bernoul.li>

Date: Wed, 10 Feb 2016 16:18:02 UTC

Severity: normal

Merged with 22510

Found in versions 25.0.50, 25.1.50

Fixed in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Artur Malabarba <bruce.connor.am <at> gmail.com>, Jonas Bernoulli <jonas <at> bernoul.li>, 22616 <at> debbugs.gnu.org
Subject: bug#22616: 25.0.50; Change to lm-header breaks lm-header-multiline
Date: Wed, 11 May 2016 03:00:22 +0300
On 05/09/2016 05:13 AM, Artur Malabarba wrote:
> IIRC, I made this change because the previous behaviour caused
> `package-install-from-buffer' to move point. Since I saw no reason for
> lm-header to move point, I fixed the issue at its roots.

Doesn't package-install-from-buffer currently move point anyway? It 
jumps to the end of the buffer.

Moving save-excursion there does help.

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 3f0e972..f481157 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1979,17 +1979,18 @@ package-install-from-buffer
 Downloads and installs required packages as needed."
   (interactive)
   (let* ((pkg-desc
-          (cond
-            ((derived-mode-p 'dired-mode)
-             ;; This is the only way a package-desc object with a `dir'
-             ;; desc-kind can be created.  Such packages can't be
-             ;; uploaded or installed from archives, they can only be
-             ;; installed from local buffers or directories.
-             (package-dir-info))
-            ((derived-mode-p 'tar-mode)
-             (package-tar-file-info))
-            (t
-             (package-buffer-info))))
+          (save-excursion
+            (cond
+             ((derived-mode-p 'dired-mode)
+              ;; This is the only way a package-desc object with a `dir'
+              ;; desc-kind can be created.  Such packages can't be
+              ;; uploaded or installed from archives, they can only be
+              ;; installed from local buffers or directories.
+              (package-dir-info))
+             ((derived-mode-p 'tar-mode)
+              (package-tar-file-info))
+             (t
+              (package-buffer-info)))))
          (name (package-desc-name pkg-desc)))
     ;; Download and install the dependencies.
     (let* ((requires (package-desc-reqs pkg-desc))





This bug report was last modified 9 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.