Partially revert changes from bug#6157 (bug#81170, bug#45226)

* lisp/emacs-lisp/lisp.el (narrow-to-defun): Partially revert
changes from bug#6157 (bug#81170, bug#45226)
This commit is contained in:
Tomas Nordin 2026-06-09 22:00:26 +03:00 committed by Filipp Gunbin
parent 669ca4df18
commit 02f22865f6

View file

@ -756,15 +756,10 @@ Interactively, the behavior depends on `narrow-to-defun-include-comments'."
;; the function might go to the previous function.
;;
;; Therefore we first move one character forward and then call
;; `beginning-of-defun'. However now we must check that we did
;; not move into the next function.
(let ((here (point)))
;; `beginning-of-defun'.
(unless (eolp)
(forward-char))
(beginning-of-defun)
(when (< (point) here)
(goto-char here)
(beginning-of-defun)))
(setq beg (point))
(end-of-defun)
(setq end (point))