diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-05-29 22:47:20 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-05-29 22:47:20 -0400 |
commit | 29a042b3a7024406cc921b08d760d2af2a3312ee (patch) | |
tree | 6ac37bdfbda74937a9625a2eafd216e017a4d286 /lisp | |
parent | 8259730da8dcc0eabbf39ed89e7910788cc49ad6 (diff) | |
download | emacs.d-29a042b3a7024406cc921b08d760d2af2a3312ee.tar.gz |
Shorten narrow-to-comment-heading's docstring
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/km-editing.el | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/lisp/km-editing.el b/lisp/km-editing.el index eb93d0c..159e0da 100644 --- a/lisp/km-editing.el +++ b/lisp/km-editing.el @@ -107,46 +107,13 @@ XSELECT is non-nil, copy the region with `x-select-text'." ;;;###autoload (defun km/narrow-to-comment-heading () "Narrow to the current comment heading subtree. - Narrow the buffer from the current comment heading to the next comment heading of the same level or, if not found, to the end of -the buffer. - -A comment is considered a heading if it is at the beginning of -the line and if it conists of 3 or more occurences of -`comment-start'. The number of `comment-start' characters is +the buffer. A comment is considered a heading if it is at the +beginning of the line and if it conists of 3 or more occurences +of `comment-start'. The number of `comment-start' characters is taken to indicate the level of the heading (with 3 being the top -level). - -In the examples below, 'x' indicates the current point and '>>>' -and '<<<' mark the bounds of the narrowed region. - ---------------------------------------------------------------- - >>>;;; Level one heading - x - - ;;;; Level two heading - - <<< - ;;; Another level one heading -------------------------------eob------------------------------ - ---------------------------------------------------------------- - ;;; Level one heading - - >>>;;;; Level two heading - x - <<< - ;;;; Another level one heading -------------------------------eob------------------------------ - ---------------------------------------------------------------- - >>>;;; Level one heading - x - - ;;;; Level two heading - <<< -------------------------------eob------------------------------" +level)." (interactive) (unless comment-start (user-error "Comment syntax is not defined for current buffer")) |