mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
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>
|
2014-05-20 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
* avoid.el (mouse-avoidance-set-mouse-position): Don't raise frame.
|
* 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).
|
;; may fetch a URL redirect page).
|
||||||
(when (listp (read (current-buffer)))
|
(when (listp (read (current-buffer)))
|
||||||
(make-directory dir t)
|
(make-directory dir t)
|
||||||
(setq buffer-file-name (expand-file-name file dir))
|
(write-region nil nil (expand-file-name file dir) nil 'silent)))
|
||||||
(let ((version-control 'never)
|
|
||||||
(require-final-newline nil))
|
|
||||||
(save-buffer))))
|
|
||||||
(when good-signatures
|
(when good-signatures
|
||||||
;; Write out good signatures into archive-contents.signed file.
|
;; Write out good signatures into archive-contents.signed file.
|
||||||
(write-region (mapconcat #'epg-signature-to-string good-signatures "\n")
|
(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--with-work-buffer
|
||||||
(package-archive-base desc)
|
(package-archive-base desc)
|
||||||
(format "%s-readme.txt" name)
|
(format "%s-readme.txt" name)
|
||||||
(setq buffer-file-name
|
(save-excursion
|
||||||
(expand-file-name readme package-user-dir))
|
(goto-char (point-max))
|
||||||
(let ((version-control 'never)
|
(unless (bolp)
|
||||||
(require-final-newline t))
|
(insert ?\n)))
|
||||||
(save-buffer))
|
(write-region nil nil
|
||||||
|
(expand-file-name readme package-user-dir)
|
||||||
|
nil 'silent)
|
||||||
(setq readme-string (buffer-string))
|
(setq readme-string (buffer-string))
|
||||||
t))
|
t))
|
||||||
(error nil))
|
(error nil))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue