bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17155: 24.3; ELPA files should not appear in recentf


From: Dmitry Gutov
Subject: bug#17155: 24.3; ELPA files should not appear in recentf
Date: Tue, 20 May 2014 05:58:20 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.90 (gnu/linux)

Glenn Morris <address@hidden> writes:

> I think this is because package.el uses `save-buffer'.
>
> Unless it really needs to do that, I think it should use something more
> low-level.

The patch below seems to work okay:


=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el  2014-03-28 22:47:46 +0000
+++ lisp/emacs-lisp/package.el  2014-05-20 02:53:29 +0000
@@ -1245,9 +1245,7 @@
       (when (listp (read (current-buffer)))
        (make-directory dir t)
        (setq buffer-file-name (expand-file-name file dir))
-       (let ((version-control 'never)
-              (require-final-newline nil))
-         (save-buffer))))
+       (basic-save-buffer-1)))
     (when good-signatures
       ;; Write out good signatures into archive-contents.signed file.
       (write-region (mapconcat #'epg-signature-to-string good-signatures "\n")
@@ -1495,9 +1493,11 @@
                          (format "%s-readme.txt" name)
                        (setq buffer-file-name
                              (expand-file-name readme package-user-dir))
-                       (let ((version-control 'never)
-                             (require-final-newline t))
-                         (save-buffer))
+                       (save-excursion
+                         (goto-char (point-max))
+                         (unless (bolp)
+                           (insert ?\n)))
+                       (basic-save-buffer-1)
                        (setq readme-string (buffer-string))
                        t))
                 (error nil))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]