diff options
| author | Sam Steingold | 2015-04-14 15:14:20 -0400 |
|---|---|---|
| committer | Sam Steingold | 2015-04-14 15:14:20 -0400 |
| commit | e45dbdc386e08c0733cfc6d3cd7e574d8474b249 (patch) | |
| tree | 4a43ee97cfffd58b4099a796699b23de61fca1d5 | |
| parent | 95cee7f6a6c9332296e386ca6e6fcce3141e5d13 (diff) | |
| download | emacs-e45dbdc386e08c0733cfc6d3cd7e574d8474b249.tar.gz emacs-e45dbdc386e08c0733cfc6d3cd7e574d8474b249.zip | |
package--ensure-init-file: widen requires save-restriction
| -rw-r--r-- | lisp/emacs-lisp/package.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index dd1c5dfc056..2fb54f0d944 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -1782,9 +1782,10 @@ using `package-compute-transaction'." | |||
| 1782 | (if buffer | 1782 | (if buffer |
| 1783 | (with-current-buffer buffer | 1783 | (with-current-buffer buffer |
| 1784 | (save-excursion | 1784 | (save-excursion |
| 1785 | (widen) | 1785 | (save-restriction |
| 1786 | (goto-char (point-min)) | 1786 | (widen) |
| 1787 | (search-forward "(package-initialize)" nil 'noerror))) | 1787 | (goto-char (point-min)) |
| 1788 | (search-forward "(package-initialize)" nil 'noerror)))) | ||
| 1788 | (with-temp-buffer | 1789 | (with-temp-buffer |
| 1789 | (insert-file-contents user-init-file) | 1790 | (insert-file-contents user-init-file) |
| 1790 | (goto-char (point-min)) | 1791 | (goto-char (point-min)) |