diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-08-18 09:23:45 +0200 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-08-18 09:23:45 +0200 |
commit | d3f03666bbd6c506d65650c33413df826f502065 (patch) | |
tree | 52c932f10280cc9a63a4cebb2a673b5e49a5a0d2 /lisp/emacs-lisp/subr-x.el | |
parent | 57e16b316d76b77de4252b7923eab8199b8c3fd5 (diff) | |
parent | 9f26a8d31b1c7e6a596ca0933f327df5ac60463d (diff) | |
download | emacs-d3f03666bbd6c506d65650c33413df826f502065.tar.gz emacs-d3f03666bbd6c506d65650c33413df826f502065.tar.bz2 emacs-d3f03666bbd6c506d65650c33413df826f502065.zip |
Merge remote-tracking branch 'origin/master' into feature/package+vc
Diffstat (limited to 'lisp/emacs-lisp/subr-x.el')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 1cce97cdb10..bd7c3c82f97 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -467,6 +467,18 @@ be marked unmodified, effectively ignoring those changes." (equal ,hash (buffer-hash))) (restore-buffer-modified-p nil)))))))) +(defun emacs-etc--hide-local-variables () + "Hide local variables. +Used by `emacs-authors-mode' and `emacs-news-mode'." + (narrow-to-region (point-min) + (save-excursion + (goto-char (point-max)) + ;; Obfuscate to avoid this being interpreted + ;; as a local variable section itself. + (if (re-search-backward "^Local\sVariables:$" nil t) + (progn (forward-line -1) (point)) + (point-max))))) + (provide 'subr-x) ;;; subr-x.el ends here |