;;; compiled by rms@mole.gnu.ai.mit.edu on Sat May 29 18:22:32 1993
;;; from file /home/fsf/rms/e19/lisp/add-log.el
;;; emacs version 19.9.0.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(defvar change-log-default-name nil "\
*Name of a change log file for \\[add-change-log-entry].")
(fset (quote change-log-name) #[nil " 	= Çć" [change-log-default-name system-type vax-vms "$CHANGE_LOG$.TXT" "ChangeLog"] 2])
(defalias 'prompt-for-change-log-name #[nil " 	\"	#!)" [change-log-name default expand-file-name read-file-name format "Log file (default %s): " nil] 5 "\
Prompt for a change log name."])
(defalias 'find-change-log #[(&optional file-name) " 	 \n \n!! 	=&  \"& !2  \"!!!g !!!!\"g  \"@ !q *!L" [file-name change-log-default-name buffer-file-name file-name-directory file-chase-links default-directory assq buffer-local-variables file-directory-p expand-file-name change-log-name nil parent-dir file1 file-exists-p directory-file-name string= make-local-variable] 5 "\
Find a change log file for \\[add-change-log-entry] and return the name.
Optional arg FILE-NAME is a name to try first.
If FILE-NAME is nil, use the value of `change-log-default-name' if non-nil.
Failing that, use \"ChangeLog\" in the current directory.
If the file does not exist in the named directory, successive parent
directories are tried.

Once a file is found, `change-log-default-name' is set locally in the
current buffer to the complete file name."])
(defalias 'add-change-log-entry #[(&optional whoami file-name other-window) "  \"    \"  +  \"-  \n !l \"l !!P\"f !Oj ! \" ! ! eb O!!!&! !  cccccc\ncc! ! !`eb# ocoP!P#1!!m$!$`!`)\"c! o!!B!5mZ!Z`!`)\"Bc!<jm\" !!)@ cA ccB c!C !)?D c." [whoami read-input "Full name: " user-full-name full-name "Login name: " user-login-name login-name "Site name: " system-name site-name add-log-current-defun defun nil paragraph-end entry find-change-log file-name buffer-file-name string= string-match "^" regexp-quote file-name-directory match-end 0 file-name-nondirectory other-window equal find-file-other-window find-file undo-boundary looking-at concat current-time-string 10 ".* " "  (" "@" forward-line 1 "  " ")\n\n" "\n*[^\n* 	]" skip-chars-forward "\n" forward-paragraph re-search-forward "^\\s *\\*\\s *$" t "* " "\\(\\s \\|[(),:]\\)" "^\\s *$\\|^\\s \\*" "^\\s *$" delete-region "\n\n" -2 indent-relative-maybe "\\sW" "\n\n\n" left-margin insert "" "\\s *$" " " "(" "): " "\\s *\\(\\*\\s *\\)?$" ": "] 8 "\
Find change log file and add an entry for today.
Optional arg (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." (list current-prefix-arg (prompt-for-change-log-name))])
(defalias 'add-change-log-entry-other-window #[(&optional whoami file-name) "	\n#" [add-change-log-entry whoami file-name t] 4 "\
Find change log file in other window and add an entry for today.
First arg (interactive prefix) non-nil means prompt for user name and site.
Second arg is file name of change log.
Interactively, with a prefix argument, the file name is prompted for." (byte-code "  D" [current-prefix-arg prompt-for-change-log-name] 2)])
(defalias 'change-log-mode #[nil "  	!L!L!L!L!L!" [kill-all-local-variables indented-text-mode change-log-mode major-mode "Change Log" mode-name 8 left-margin 74 fill-column make-local-variable paragraph-start "^\\s *$\\|^^L" paragraph-separate "^\\s *$\\|^^L\\|^\\sw" page-delimiter "^\\<\\|^" version-control never adaptive-fill-regexp "\\s *" run-hooks change-log-mode-hook] 2 "\
Major mode for editting 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'." nil])
(defvar add-log-current-defun-header-regexp "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[a-z_---A-Z]+\\)[ 	]*[:=]" "\
*Heuristic regexp used by `add-log-current-defun' for unknown major modes.")
(defalias 'add-log-current-defun #[nil "" [nil (byte-code "`	>: m !  `W!`Y!!`!`\"	> !`Zf=U !E !) !`Zf=p !` !!`!`\"	>6!! ! m !  `W!ډ!o ! ! ߏ b!`fU !!`!`\"2`䏅2bo!!)!`Y)2`V2`!`\"*	>T#!b`T `\"	=m#!!\"/ 0`Z#!!\")*" [location major-mode (emacs-lisp-mode lisp-mode scheme-mode) forward-char 1 beginning-of-defun end-of-defun forward-sexp -1 forward-word skip-chars-forward " " buffer-substring (c-mode (quote c++-mode)) forward-line 0 2 92 looking-at "[ 	]*#[ 	]*define[ 	]" search-forward "define" " 	" (c-mode (quote c++-mode)) "{\\|\\(\\s *$\\)" backward-sexp nil tem beg "[ 	\n]" (byte-code "!!!`!) Y" [forward-line 1 backward-sexp 0 tem looking-at "DEFUN\\b" location] 2) ((error)) down-list 34 " ," (byte-code "!!!Ň" [down-list 1 backward-up-list skip-chars-backward " 	" t] 2) ((error)) "[^\n]" (TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode) re-search-backward "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" t match-beginning end-of-line texinfo-mode "^@node[ 	]+\\([^,]+\\)," match-end case-fold-search add-log-current-defun-header-regexp 10000] 4) ((error))] 3 "\
Return name of function definition point is in, or nil.

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

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."])
(provide (quote add-log))
