From: Dmitry Gutov <dgutov@yandex.ru>
To: Artur Malabarba <bruce.connor.am@gmail.com>,
Jonas Bernoulli <jonas@bernoul.li>,
22616@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 [thread overview]
Message-ID: <10d3267b-4566-dbe5-2bf6-7ae9893499b8@yandex.ru> (raw)
In-Reply-To: <CAAdUY-KcRyuFj-ocbAMpwnWBXhqfZ9ayPvYojORHOMY8MzBmcg@mail.gmail.com>
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))
next prev parent reply other threads:[~2016-05-11 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 16:17 bug#22616: 25.0.50; Change to lm-header breaks lm-header-multiline Jonas Bernoulli
2016-05-08 23:52 ` Dmitry Gutov
2016-05-09 2:13 ` Artur Malabarba
2016-05-11 0:00 ` Dmitry Gutov [this message]
2016-05-11 22:34 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10d3267b-4566-dbe5-2bf6-7ae9893499b8@yandex.ru \
--to=dgutov@yandex.ru \
--cc=22616@debbugs.gnu.org \
--cc=bruce.connor.am@gmail.com \
--cc=jonas@bernoul.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).