comparison lisp/add-log.el @ 811:e694e0879463

*** empty log message ***
author Eric S. Raymond <esr@snark.thyrsus.com>
date Fri, 17 Jul 1992 08:15:29 +0000
parents 8cff3b3bd089
children a8aef92e0025
comparison
equal deleted inserted replaced
810:80303373daae 811:e694e0879463
1 ;;; add-log.el --- change log maintenance commands for Emacs 1 ;;; add-log.el --- change log maintenance commands for Emacs
2
3 ;; Maintainer: FSF
2 4
3 ;; Copyright (C) 1985, 86, 87, 88, 89, 90, 91, 1992 5 ;; Copyright (C) 1985, 86, 87, 88, 89, 90, 91, 1992
4 ;; Free Software Foundation, Inc. 6 ;; Free Software Foundation, Inc.
5 7
6 ;; This file is part of GNU Emacs. 8 ;; This file is part of GNU Emacs.
7 9
8 ;; GNU Emacs is free software; you can redistribute it and/or modify 10 ;; GNU Emacs is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by 11 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 1, or (at your option) 12 ;; the Free Software Foundation; either version 2, or (at your option)
11 ;; any later version. 13 ;; any later version.
12 14
13 ;; GNU Emacs is distributed in the hope that it will be useful, 15 ;; GNU Emacs is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 19
18 ;; You should have received a copy of the GNU General Public License 20 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU Emacs; see the file COPYING. If not, write to 21 ;; along with GNU Emacs; see the file COPYING. If not, write to
20 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 23
24 ;;; Code:
22 25
23 ;;;###autoload 26 ;;;###autoload
24 (defvar change-log-default-name nil 27 (defvar change-log-default-name nil
25 "*Name of a change log file for \\[add-change-log-entry].") 28 "*Name of a change log file for \\[add-change-log-entry].")
26 29
167 (prompt-for-change-log-name)))) 170 (prompt-for-change-log-name))))
168 (add-change-log-entry whoami file-name t)) 171 (add-change-log-entry whoami file-name t))
169 172
170 (defun change-log-mode () 173 (defun change-log-mode ()
171 "Major mode for editting change logs; like Indented Text Mode. 174 "Major mode for editting change logs; like Indented Text Mode.
175 Prevents numeric backups and sets `left-margin' to 8 and `fill-column'
176 to 74.
172 New log entries are usually made with \\[add-change-log-entry]." 177 New log entries are usually made with \\[add-change-log-entry]."
173 (interactive) 178 (interactive)
174 (kill-all-local-variables) 179 (kill-all-local-variables)
175 (indented-text-mode) 180 (indented-text-mode)
176 (setq major-mode 'change-log-mode) 181 (setq major-mode 'change-log-mode)
177 (setq mode-name "Change Log") 182 (setq mode-name "Change Log")
183 (setq left-margin 8)
184 (setq fill-column 74)
178 ;; Let each entry behave as one paragraph: 185 ;; Let each entry behave as one paragraph:
179 (set (make-local-variable 'paragraph-start) "^\\s *$\\|^^L") 186 (set (make-local-variable 'paragraph-start) "^\\s *$\\|^^L")
180 (set (make-local-variable 'paragraph-separate) "^\\s *$\\|^^L\\|^\\sw") 187 (set (make-local-variable 'paragraph-separate) "^\\s *$\\|^^L\\|^\\sw")
181 ;; Let all entries for one day behave as one page. 188 ;; Let all entries for one day behave as one page.
182 ;; Note that a page boundary is also a paragraph boundary. 189 ;; Note that a page boundary is also a paragraph boundary.
246 (if (re-search-backward add-log-current-defun-header-regexp 253 (if (re-search-backward add-log-current-defun-header-regexp
247 (- (point) 10000) 254 (- (point) 10000)
248 t) 255 t)
249 (buffer-substring (match-beginning 1) 256 (buffer-substring (match-beginning 1)
250 (match-end 1)))))))) 257 (match-end 1))))))))
258
259 ;;; add-log.el ends here