diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-11-11 05:33:37 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-11-11 05:33:37 +0000 |
commit | ba74237ca8e3050b6123ce0ef57dcdca48b1e5f9 (patch) | |
tree | 933b879f7b4d10dfa50cda6ce0cbc3738fde891b /lisp/add-log.el | |
parent | 75067556a5ebd904125e20e4ea49dab5445adb00 (diff) | |
download | emacs-ba74237ca8e3050b6123ce0ef57dcdca48b1e5f9.tar.gz |
(change-log-mode): Remove incorrect "^" anchors from
paragraph-start and -separate.
(change-log-fill-paragraph): Use regular value of paragraph-start
to bound paragraph to be filled, modified values only to do the
filling. Make lines beginning with parentheses
paragraph-starters, but not paragraph-separators.
Diffstat (limited to 'lisp/add-log.el')
-rw-r--r-- | lisp/add-log.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index dbeff6a6bbc..e77b8cdcb35 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -282,8 +282,10 @@ Runs `change-log-mode-hook'." fill-column 74) (use-local-map change-log-mode-map) ;; Let each entry behave as one paragraph: - (set (make-local-variable 'paragraph-start) "^\\s *$\\|^\f") - (set (make-local-variable 'paragraph-separate) "^\\s *$\\|^\f\\|^\\sw") + ;; We really do want "^" in paragraph-start below: it is only the lines that + ;; begin at column 0 (despite the left-margin of 8) that we are looking for. + (set (make-local-variable 'paragraph-start) "\\s *$\\|\f\\|^\\sw") + (set (make-local-variable 'paragraph-separate) "\\s *$\\|\f\\|^\\sw") ;; Let all entries for one day behave as one page. ;; Match null string on the date-line so that the date-line ;; is grouped with what follows. @@ -302,9 +304,10 @@ Runs `change-log-mode-hook'." "Fill the paragraph, but preserve open parentheses at beginning of lines. Prefix arg means justify as well." (interactive "P") - (let ((paragraph-separate (concat paragraph-separate "\\|^\\s *\\s(")) - (paragraph-start (concat paragraph-start "\\|^\\s *\\s("))) - (fill-paragraph justify))) + (let ((end (save-excursion (forward-paragraph) (point))) + (beg (save-excursion (backward-paragraph)(point))) + (paragraph-start (concat paragraph-start "\\|\\s *\\s("))) + (fill-region beg end justify))) (defvar add-log-current-defun-header-regexp "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ \t]*[:=]" |