diff options
| author | Noam Postavsky | 2017-04-20 14:07:19 +0200 |
|---|---|---|
| committer | Marcin Borkowski | 2017-05-12 11:36:45 +0200 |
| commit | 0397f85c6f9b0a5325f774e2a56e7cd85176e228 (patch) | |
| tree | 8f427f9fd1a1985af3c631ce44b791b68a92325e | |
| parent | 22fc91704be4737865b3715e5278dc78029791bd (diff) | |
| download | emacs-0397f85c6f9b0a5325f774e2a56e7cd85176e228.tar.gz emacs-0397f85c6f9b0a5325f774e2a56e7cd85176e228.zip | |
* lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point.
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 10 |
1 files changed, 3 insertions, 7 deletions
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." | |||
| 569 | ; https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-02/msg00196.html | 569 | ; https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-02/msg00196.html |
| 570 | (beginning-of-defun (1- (- arg)))) | 570 | (beginning-of-defun (1- (- arg)))) |
| 571 | (push-mark end nil t)))))) | 571 | (push-mark end nil t)))))) |
| 572 | (let (nbobp) | 572 | (skip-chars-backward "[:space:]\n") |
| 573 | (while (progn | 573 | (unless (bobp) |
| 574 | (setq nbobp (zerop (forward-line -1))) | 574 | (forward-line 1))) |
| 575 | (and (looking-at "^\\s-*$") | ||
| 576 | nbobp))) | ||
| 577 | (when nbobp | ||
| 578 | (forward-line 1)))) | ||
| 579 | 575 | ||
| 580 | (defvar narrow-to-defun-include-comments nil | 576 | (defvar narrow-to-defun-include-comments nil |
| 581 | "If non-nil, `narrow-to-defun' will also show comments preceding the defun.") | 577 | "If non-nil, `narrow-to-defun' will also show comments preceding the defun.") |