diff options
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 650c0aa31fc..a62fe926e8b 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -209,6 +209,15 @@ The defun marked is the one that contains point or follows point." | |||
| 209 | (beginning-of-defun) | 209 | (beginning-of-defun) |
| 210 | (re-search-backward "^\n" (- (point) 1) t)) | 210 | (re-search-backward "^\n" (- (point) 1) t)) |
| 211 | 211 | ||
| 212 | (defun narrow-to-defun (&optional arg) | ||
| 213 | "Make text outside current defun invisible. | ||
| 214 | The defun visible is the one that contains point or follows point." | ||
| 215 | (interactive) | ||
| 216 | (save-excursion | ||
| 217 | (widen) | ||
| 218 | (beginning-of-defun) | ||
| 219 | (narrow-to-region (point) (progn (end-of-defun) (point))))) | ||
| 220 | |||
| 212 | (defun insert-parentheses (arg) | 221 | (defun insert-parentheses (arg) |
| 213 | "Put parentheses around next ARG sexps. Leave point after open-paren. | 222 | "Put parentheses around next ARG sexps. Leave point after open-paren. |
| 214 | No argument is equivalent to zero: just insert `()' and leave point between. | 223 | No argument is equivalent to zero: just insert `()' and leave point between. |