From: Noam Postavsky Date: Thu, 20 Apr 2017 12:07:19 +0000 (+0200) Subject: * lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point. X-Git-Tag: emacs-26.0.90~521^2~405^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0397f85c6f9b0a5325f774e2a56e7cd85176e228;p=emacs.git * lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point. --- diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index e74e2474ee9..71c27d08a2f 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -569,13 +569,9 @@ the one(s) already marked." ; https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-02/msg00196.html (beginning-of-defun (1- (- arg)))) (push-mark end nil t)))))) - (let (nbobp) - (while (progn - (setq nbobp (zerop (forward-line -1))) - (and (looking-at "^\\s-*$") - nbobp))) - (when nbobp - (forward-line 1)))) + (skip-chars-backward "[:space:]\n") + (unless (bobp) + (forward-line 1))) (defvar narrow-to-defun-include-comments nil "If non-nil, `narrow-to-defun' will also show comments preceding the defun.")