;ELC   
;;; Compiled by rms@psilocin.ai.mit.edu on Wed Jul  8 20:17:46 1998
;;; from file /gd/gnu/emacs/lisp/add-log.el
;;; in Emacs version 20.2.97.2
;;; with bytecomp version 2.47
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`add-log.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(custom-declare-group 'change-log nil "Change log maintenance" :group 'tools :link '(custom-manual "(emacs)Change Log") :prefix "change-log-" :prefix "add-log-")
#@57 *Name of a change log file for \[add-change-log-entry].
(custom-declare-variable 'change-log-default-name 'nil '(#$ . -764) :type '(choice (const :tag "default" nil) string) :group 'change-log)
#@233 *If non-nil, function to guess name of current function from surrounding text.
\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
instead) with no arguments.  It returns a string or nil if it cannot guess.
(custom-declare-variable 'add-log-current-defun-function 'nil '(#$ . -965) :type 'function :group 'change-log)
#@133 *Full name of user, for inclusion in ChangeLog daily headers.
This defaults to the value returned by the `user-full-name' function.
(custom-declare-variable 'add-log-full-name 'nil '(#$ . -1315) :type '(choice (const :tag "Default" nil) string) :group 'change-log)
#@128 *Electronic mail address of user, for inclusion in ChangeLog daily headers.
This defaults to the value of `user-mail-address'.
(custom-declare-variable 'add-log-mailing-address 'nil '(#$ . -1587) :type '(choice (const :tag "Default" nil) string) :group 'change-log)
#@188 *Function that defines the time format.
For example, `add-log-iso8601-time-string', which gives the
date in international ISO 8601 format,
and `current-time-string' are two valid values.
(custom-declare-variable 'add-log-time-format ''add-log-iso8601-time-string '(#$ . -1860) :type '(radio (const :tag "International ISO 8601 format" add-log-iso8601-time-string) (const :tag "Old format, as returned by `current-time-string'" current-time-string) (function :tag "Other")) :group 'change-log)
#@731 *If non-nil, normally keep day's log entries for one file together.

Log entries for a given file made with \[add-change-log-entry] or
\[add-change-log-entry-other-window] will only be added to others for that file made
today if this variable is non-nil or that file comes first in today's
entries.  Otherwise another entry for that file will be started.  An
original log:

	* foo (...): ...
	* bar (...): change 1

in the latter case, \[add-change-log-entry-other-window] in a buffer visiting `bar', yields:

	* bar (...): -!-
	* foo (...): ...
	* bar (...): change 1

and in the former:

	* foo (...): ...
	* bar (...): change 1
	(...): -!-

The NEW-ENTRY arg to `add-change-log-entry' can override the effect of
this variable.
(custom-declare-variable 'add-log-keep-changes-together 'nil '(#$ . -2360) :version "20.3" :type 'boolean :group 'change-log)
#@57 Additional expressions to highlight in Change Log mode.
(defvar change-log-font-lock-keywords '(("^\\sw.........[0-9:+ ]*" (0 font-lock-string-face) ("\\([^<]+\\)<\\([A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+\\)>" nil nil (1 font-lock-constant-face) (2 font-lock-variable-name-face))) ("^	\\* \\([^ ,:([\n]+\\)" (1 font-lock-function-name-face) ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 font-lock-function-name-face))) ("(\\([^) ,:\n]+\\)" (1 font-lock-keyword-face) ("\\=, *\\([^) ,:\n]+\\)" nil nil (1 font-lock-keyword-face))) ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 font-lock-variable-name-face)) ("^	\\(From\\|Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)" 1 font-lock-comment-face) ("  \\(From\\|Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)" 1 font-lock-comment-face)) (#$ . 3222))
#@35 Keymap for Change Log major mode.
(defvar change-log-mode-map nil (#$ . 4071))
(byte-code "\204 \301 \301\207" [change-log-mode-map make-sparse-keymap] 1)
#@149 Time zone used for calculating change log time stamps.
It takes the same format as the TZ argument of `set-time-zone-rule'.
If nil, use local time.
(defvar change-log-time-zone-rule nil (#$ . 4236))
(byte-code "\301B\301\207" [current-load-list add-log-debugging] 2)
(defalias 'add-log-iso8601-time-zone #[(time) "\306!@\206 \307\211\307W\203 \310\202 \311\312	!\211\313\246\313\245\211\313\246\313\245\314\f\307U\2046 \315\202B \307U\204A \316\202B \317\n\f%.\207" [time utc-offset sign sec ss min current-time-zone 0 45 43 abs 60 format "%c%02d:%02d:%02d" "%c%02d:%02d" "%c%02d" mm hh] 7])
(defalias 'add-log-iso8601-time-string #[nil "\203 \303\304!\305 \306\216\307!\210\310\311	\"\312	!P+\207\310\313!\207" [change-log-time-zone-rule now tz getenv "TZ" current-time ((set-time-zone-rule tz)) set-time-zone-rule format-time-string "%Y-%m-%d " add-log-iso8601-time-zone "%Y-%m-%d"] 3])
(defalias 'change-log-name #[nil "\206 	\302=\203\f \303\207\304\207" [change-log-default-name system-type vax-vms "$CHANGE_LOG$.TXT" "ChangeLog"] 2])
#@31 Prompt for a change log name.
(defalias 'prompt-for-change-log-name #[nil "\302 \303\304\305\306\"\307#!\310	!\311\230\203 \303\310!	\"\2021 \312	!\2030 \303\310!\313	!\"\2021 	*\207" [default name change-log-name expand-file-name read-file-name format "Log file (default %s): " nil file-name-nondirectory "" file-directory-p file-name-as-directory] 5 (#$ . 5313)])
#@631 Find a change log file for \[add-change-log-entry] and return the name.

Optional arg FILE-NAME specifies the file to use.
If FILE-NAME is nil, use the value of `change-log-default-name'.
If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
(or whatever we use on this operating system).

If 'change-log-default-name' contains a leading directory component, then
simply find it in the current directory.  Otherwise, search in the current
directory and its successive parents for a file so named.

Once a file is found, `change-log-default-name' is set locally in the
current buffer to the complete file name.
(defalias 'find-change-log #[(&optional file-name) "\204p 	\205 \306	!\205 	\211\204p \n\203  \306\307\n!!\206! \310!\203. \311\312 \"\307!\311!\211\313\314!\204a \315!\204a \306\316\306!!!\306!\f\230\204a \311\317\312 !\f\"\202: \314!\204m \315!\203o *\320\301!L\210\207" [file-name change-log-default-name buffer-file-name default-directory parent-dir file1 file-name-directory file-chase-links file-directory-p expand-file-name change-log-name nil get-file-buffer file-exists-p directory-file-name file-name-nondirectory make-local-variable] 5 (#$ . 5693)])
#@583 Find change log file and add an entry for today.
Optional arg WHOAMI (interactive prefix) non-nil means prompt for user
name and site.

Second arg is FILE-NAME of change log.  If nil, uses `change-log-default-name'.
Third arg OTHER-WINDOW non-nil means visit in other window.
Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
never append to an existing entry.  Option `add-log-keep-changes-together'
otherwise affects whether a new entry is created.

Today's date is calculated according to `change-log-time-zone-rule' if
non-nil, otherwise in local time.
(defalias 'add-change-log-entry #[(&optional whoami file-name other-window new-entry) "\204 \306 	\204 \n\203 \307\310\"\307\311	\"\f\206  \312 \313\21178\314\3159!!9:\203Z :9\230\204Z \316\317\320\3219!!P:\"\203U :\322\225\313O\202Y \323:!\3249!;\325 \326 D<)=\203} 9:\232\204} \3279!\210\202\202 \3309!\210>\331=\204\214 \331 \210\332 \210eb\210? \333\334	\335\260@\336\320@!!\203\255 \337y\210\202\263 @\340\261\210)\336\341!\203\301 \342\313w\210\202\317 A\203\314 \343 \210\202\317 \344 \210`7eb\210\345\3467\347#\203\350 \203bc\210\202b@\204*\313B\345\320\350P!\351P7\347#)\203*\345\352!\210\322\224b\210m\204\336\353!\203`\212\337y\210`)|\210\202\340c\210\354y\210\355 \210\202b\337y\210\336\356!\2039\337y\210\202-m\204O\336\353!\203O`\212\337y\210`)|\210\2029\357c\210\354y\210Cj\210\350\206_\360\261\2108\203\203\332 \210\212\322y\210\336\361!)\203y\360\202z\362\3638\364\261\202\221\212\322y\210\336\365!)?\205\221\366c+\207" [add-log-full-name add-log-mailing-address user-mail-address whoami add-log-current-defun-function entry user-full-name read-input "Full name: " "Mailing address: " add-log-current-defun nil expand-file-name find-change-log string-match "^" regexp-quote file-name-directory 0 file-name-nondirectory find-buffer-visiting gap-position gap-size find-file-other-window find-file change-log-mode undo-boundary "  " "  <" ">" looking-at 1 "\n\n" "\n*[^\n* 	]" "\n" forward-page forward-paragraph re-search-forward "^\\s *\\*\\s *$" t "* " "\\(\\s \\|[(),:]\\)" "^\\s *$\\|^\\s \\*" "^\\s *$" -2 indent-relative-maybe "\\sW" "\n\n\n" "" "\\s *$" " " "(" "): " "\\s *\\(\\*\\s *\\)?$" ": " bound defun file-name buffer-file-name buffer add-log-debugging other-window major-mode add-log-time-format new-entry add-log-keep-changes-together case-fold-search left-margin] 6 (#$ . 6918) (list current-prefix-arg (prompt-for-change-log-name))])
#@306 Find change log file in other window and add an entry for today.
Optional arg WHOAMI (interactive prefix) non-nil means prompt for user
name and site.
Second optional arg FILE-NAME is file name of change log.
If nil, use `change-log-default-name'.

Affected by the same options as `add-change-log-entry'.
(defalias 'add-change-log-entry-other-window #[(&optional whoami file-name) "\302	\303#\207" [whoami file-name add-change-log-entry t] 4 (#$ . 9451) (byte-code "\205 \301 D\207" [current-prefix-arg prompt-for-change-log-name] 2)])
#@346 Major mode for editing change logs; like Indented Text Mode.
Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74.
New log entries are usually made with \[add-change-log-entry] or \[add-change-log-entry-other-window].
Each entry behaves as a paragraph, and the entries for one day as a page.
Runs `change-log-mode-hook'.
(defalias 'change-log-mode #[nil "\306 \210\307 \210\310\311\312\313\314\312\315!\210\316\317!\320L\210\316\321!\322L\210\316\323!L\210\316\324!\325L\210\316\326!\327L\210\316\330!\331L\210\316\332!\333L\210\334\335!\207" [major-mode mode-name left-margin fill-column indent-tabs-mode tab-width kill-all-local-variables indented-text-mode change-log-mode "Change Log" 8 74 t use-local-map make-local-variable fill-paragraph-function change-log-fill-paragraph paragraph-start "\\s *$\\|\f\\|^\\<" paragraph-separate page-delimiter "^\\<\\|^\f" version-control never adaptive-fill-regexp "\\s *" font-lock-defaults (change-log-font-lock-keywords t) run-hooks change-log-mode-hook change-log-mode-map] 2 (#$ . 9998) nil])
#@108 Fill the paragraph, but preserve open parentheses at beginning of lines.
Prefix arg means justify as well.
(defalias 'change-log-fill-paragraph #[(&optional justify) "\304 \210`\305 \210`\306P\307	\n#\210+\310\207" [paragraph-start beg end justify forward-paragraph backward-paragraph "\\|\\s *\\s(" fill-region t] 4 (#$ . 11079) "P"])
#@76 *Heuristic regexp used by `add-log-current-defun' for unknown major modes.
(custom-declare-variable 'add-log-current-defun-header-regexp '"^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ 	]*[:=]" '(#$ . -11426) :type 'regexp :group 'change-log)
#@56 *Modes that look like Lisp to `add-log-current-defun'.
(defvar add-log-lisp-like-modes '(emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode) (#$ . -11671))
#@53 *Modes that look like C to `add-log-current-defun'.
(defvar add-log-c-like-modes '(c-mode c++-mode c++-c-mode objc-mode) (#$ . -11853))
#@55 *Modes that look like TeX to `add-log-current-defun'.
(defvar add-log-tex-like-modes '(TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode) (#$ . -11995))
#@429 Return name of function definition point is in, or nil.

Understands C, Lisp, LaTeX ("functions" are chapters, sections, ...),
Texinfo (@node titles), Perl, and Fortran.

Other modes are handled by a heuristic that looks in the 10K before
point for uppercase headings starting in the first column or
identifiers followed by `:' or `=', see variable
`add-log-current-defun-header-regexp'.

Has a preference of looking backwards.
(defalias 'add-log-current-defun #[nil "\300\301\302\217\207" [nil (byte-code "\212`	\n>\203G m\204 \306u\210\307 \210\310\311!\205$\312 \210`W\205$\313\314!\210`Y\205$\310\311!\2035 \306u\210\313\306!\210\315\316w\210`\313\306!\210`{\202$	>\203\213 \212\317y\210`\320Zf\321=\203` \314y\210\202Q \310\322!)\203\213 \317y\210`\320Zf\321=\203y \314y\210\202j \323\324!\210\325\316w\210`\313\306!\210`{\202$	>\203|\317y\210\310\326!\204\240 \306y\210\202\224 m\204\247 \306u\210\307 \210\312 \210`W\205$\327\306!\210\316\211\314y\210o\204\316 \310\330!\203\316 \314y\210\202\276 \316\331\332\217\203\365 \fb\210\333\306!\210`f\334U\203\353 \313\306!\210\335\316w\210`\313\306!\210`{\202x\310\336!\203 \337 \202x`\316\340\341\217\205x\212b\210o\204\"\212\314y\210\310\342!)\203\"\314y\210\202`Y)\205x`V\205x\316\2119:h\343U\203>\314u\210`:\327\306!\210`9\314v\210\310\344!\203e\345\316x\210`:\327\306!\210`9\314v\210\202Kn\203r\310\346!\203r`99:{**\202$	;>\203\231\347\350\316\351#\205$\317\224b\210`T\316\210`{\202$	\352=\203\257\347\353\316\351#\205$\306\224\306\225{\202$	\354=\203\305\347\355\316\351#\205$\306\224\306\225{\202$	\356=\204\321	\357=\203\360 \210\351<\361\362\212\363 \210`)\351#\203\364\320!\206	\361\365\316\351#\203\374\366 \210\325\316x\210\202\377\316\210`\327 \210`{\202	\367)\202$\316<\316\210\347=`\370Z\351#\205#\306\224\306\225{)*\207" [location major-mode add-log-lisp-like-modes add-log-c-like-modes tem beg 1 beginning-of-defun looking-at "\\s(" end-of-defun forward-sexp -1 " 	\n'(" nil 0 2 92 "[ 	]*#[ 	]*define[ 	]" search-forward "define" " 	" "{\\|\\(\\s *$\\)" backward-sexp "[ 	\n]" (byte-code "\212\302\210h\303U\203 \304\210\202 \305\306!\210\307y\210`\310\311!)\205# 	Y\207" [tem location nil 92 2 backward-sexp 1 0 looking-at "DEFUN\\b"] 2) ((error)) down-list 34 " ," "^[+-]" change-log-get-method-definition (byte-code "\300\301!\210\302\301!\210\303\304x\210\305\207" [down-list 1 backward-up-list " 	" nil t] 2) ((error)) "[^\n\f]" 10 "public \\|private " " 	:" "struct \\|union \\|class " re-search-backward "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" t texinfo-mode "^@node[ 	]+\\([^,\n]+\\)" perl-mode "^sub[ 	]+\\([^ 	\n]+\\)" fortran-mode f90-mode beginning-of-fortran-subprogram re-search-forward "^[ 	]*\\(program\\|subroutine\\|function\\|[ 	a-z0-9*()]*[ 	]+function\\|\\(block[ 	]*data\\)\\)" end-of-fortran-subprogram match-string "[(\n]" backward-char "main" 10000 middle end add-log-tex-like-modes case-fold-search add-log-current-defun-header-regexp] 4) ((error))] 3 (#$ . 12166)])
(byte-code "\301B\301\207" [current-load-list change-log-get-method-definition-md] 2)
(defalias 'change-log-get-method-definition-1 #[(end) "\302\224\302\225{	Q\303\225b\207" [change-log-get-method-definition-md end 1 0] 3])
(defalias 'change-log-get-method-definition #[nil "\301\212\302\303\304\305#\203 \306\307!\210)\212\310\311\304\305#\2051 \306\312!\210\313\314!\204. \313\315!\210\306\312!\210\202 \316P*\207" [change-log-get-method-definition-md "[" re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t change-log-get-method-definition-1 " " re-search-forward "^\\([-+]\\)[ 	\n\f]*\\(([^)]*)\\)?\\s-*" "" looking-at "[{;]" "\\([A-Za-z_]*:?\\)\\s-*\\(([^)]*)\\)?[A-Za-z_]*[ 	\n\f]*" "]"] 4])
(provide 'add-log)
