1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 15:21:51 -08:00

package--ensure-init-file: widen requires save-restriction

This commit is contained in:
Sam Steingold 2015-04-14 15:14:20 -04:00
parent 95cee7f6a6
commit e45dbdc386

View file

@ -1782,9 +1782,10 @@ using `package-compute-transaction'."
(if buffer (if buffer
(with-current-buffer buffer (with-current-buffer buffer
(save-excursion (save-excursion
(widen) (save-restriction
(goto-char (point-min)) (widen)
(search-forward "(package-initialize)" nil 'noerror))) (goto-char (point-min))
(search-forward "(package-initialize)" nil 'noerror))))
(with-temp-buffer (with-temp-buffer
(insert-file-contents user-init-file) (insert-file-contents user-init-file)
(goto-char (point-min)) (goto-char (point-min))