summaryrefslogtreecommitdiff
path: root/lisp/add-log.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-11-11 05:33:37 +0000
committerRichard M. Stallman <rms@gnu.org>1995-11-11 05:33:37 +0000
commit14ee19532349ce3cef1f0fd29d136d72df5e05c6 (patch)
tree28f20b33de1fff7465417df6a871ea8247663f5f /lisp/add-log.el
parent763d157993da52634f57506a78141701d44aec49 (diff)
downloademacs-14ee19532349ce3cef1f0fd29d136d72df5e05c6.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.el13
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]*[:=]"