mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
; Use 'without-restriction'
* lisp/emacs-lisp/package.el (package--suggestion-applies-p): Replace 'save-restriction'+'widen' with 'without-restriction'.
This commit is contained in:
parent
5a53e27748
commit
c4dc5bc766
1 changed files with 2 additions and 4 deletions
|
|
@ -4591,15 +4591,13 @@ SUG should be an element of `package-autosuggest-database'."
|
|||
(and (string-match-p ext (buffer-name)) t))
|
||||
((or `(,_ magic-mode-alist ,mag ,_)
|
||||
`(,_ magic-mode-alist ,mag))
|
||||
(save-restriction
|
||||
(widen)
|
||||
(without-restriction
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(looking-at-p mag))))
|
||||
((or `(,_ interpreter-mode-alist ,magic ,_)
|
||||
`(,_ interpreter-mode-alist ,magic))
|
||||
(save-restriction
|
||||
(widen)
|
||||
(without-restriction
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(and (looking-at auto-mode-interpreter-regexp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue