Replace uses of save-buffer' with
write-region'
* lisp/emacs-lisp/package.el (package--download-one-archive): Use `write-region' instead of `save-buffer' to avoid running various hooks. (describe-package-1): Same. Insert newline at the end of the buffer if appropriate. Fixes: debbugs:17155
This commit is contained in:
parent
2614b25fd5
commit
b0df8b9535
2 changed files with 16 additions and 9 deletions
|
@ -1,3 +1,11 @@
|
|||
2014-05-21 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
* emacs-lisp/package.el (package--download-one-archive): Use
|
||||
`write-region' instead of `save-buffer' to avoid running various
|
||||
hooks. (Bug#17155)
|
||||
(describe-package-1): Same. Insert newline at the end of the
|
||||
buffer if appropriate.
|
||||
|
||||
2014-05-20 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* avoid.el (mouse-avoidance-set-mouse-position): Don't raise frame.
|
||||
|
|
|
@ -1254,10 +1254,7 @@ similar to an entry in `package-alist'. Save the cached copy to
|
|||
;; may fetch a URL redirect page).
|
||||
(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))))
|
||||
(write-region nil nil (expand-file-name file dir) nil 'silent)))
|
||||
(when good-signatures
|
||||
;; Write out good signatures into archive-contents.signed file.
|
||||
(write-region (mapconcat #'epg-signature-to-string good-signatures "\n")
|
||||
|
@ -1503,11 +1500,13 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages."
|
|||
(package--with-work-buffer
|
||||
(package-archive-base desc)
|
||||
(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)))
|
||||
(write-region nil nil
|
||||
(expand-file-name readme package-user-dir)
|
||||
nil 'silent)
|
||||
(setq readme-string (buffer-string))
|
||||
t))
|
||||
(error nil))
|
||||
|
|
Loading…
Add table
Reference in a new issue