;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Thu Jun 8 22:11:45 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/add-log.el ;;; emacs version 19.28.93.6. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.28.90"))) (error "`add-log.el' was compiled for Emacs 19.29 or later")) #@57 *Name of a change log file for \[add-change-log-entry]. (defvar change-log-default-name nil (#$ . -476)) #@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. (defvar add-log-current-defun-function nil (#$ . -588)) #@133 *Full name of user, for inclusion in ChangeLog daily headers. This defaults to the value returned by the `user-full-name' function. (defvar add-log-full-name nil (#$ . -883)) #@128 *Electronic mail address of user, for inclusion in ChangeLog daily headers. This defaults to the value of `user-mail-address'. (defvar add-log-mailing-address nil (#$ . -1065)) #@57 Additional expressions to highlight in Change Log mode. (defvar change-log-font-lock-keywords (quote (("^[SMTWF].+" . font-lock-function-name-face) ("^ \\* \\([^ :\n]+\\)" 1 font-lock-comment-face) ("(\\([^)\n]+\\))" 1 font-lock-keyword-face))) (#$ . 1248)) #@35 Keymap for Change Log major mode. (defvar change-log-mode-map nil (#$ . 1512)) (byte-code " #" [change-log-mode-map make-sparse-keymap define-key "" change-log-fill-paragraph] 4) (defalias 'change-log-name #[nil " =\fÇ = =ƇLJ" [change-log-default-name system-type vax-vms "$CHANGE_LOG$.TXT" ms-dos windows-nt "changelo" "ChangeLog"] 2]) #@31 Prompt for a change log name. (defalias 'prompt-for-change-log-name #[nil "  \" #!!ɘ\" !\"7!5 !!\"7*" [change-log-name default expand-file-name read-file-name format "Log file (default %s): " nil name file-name-nondirectory "" file-directory-p file-name-as-directory] 5 (#$ . 1886)]) #@632 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) "}  ! } !!! !. \"!!\n  !k !k !!!\n !\nk !\n\" < !y !| *!L" [file-name change-log-default-name file-name-directory buffer-file-name file-chase-links default-directory file-directory-p expand-file-name change-log-name nil parent-dir file1 get-file-buffer file-exists-p directory-file-name file-name-nondirectory make-local-variable] 5 (#$ . 2213)]) #@379 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. Fourth arg NEW-ENTRY non-nil means always create a new entry at the front; never append to an existing entry. (defalias 'add-change-log-entry #[(&optional whoami file-name other-window new-entry) " \" \"   \" ʉ \f !!^^!!P\"X֕O\\! ss!x!= eb O! ! !!y !w!`\feb\f# Q cQ, P!P\f#!ym\f!\f`y`)|cy Qy!'ym=!=`y`)|'cy6j N r y!)hi y!)?c+" [whoami read-input "Full name: " add-log-full-name "Mailing address: " add-log-mailing-address user-full-name user-mail-address add-log-current-defun-function add-log-current-defun nil entry paragraph-end defun expand-file-name find-change-log file-name buffer-file-name string-match "^" regexp-quote file-name-directory 0 file-name-nondirectory other-window find-file-other-window find-file major-mode change-log-mode undo-boundary looking-at current-time-string 10 ".* " " <" 1 " " ">\n\n" "\n*[^\n* ]" "\n" forward-paragraph re-search-forward "^\\s *\\*\\s *$" t new-entry "* " "\\(\\s \\|[(),:]\\)" "^\\s *$\\|^\\s \\*" "^\\s *$" "\n\n" -2 indent-relative-maybe "\\sW" "\n\n\n" left-margin "" "\\s *$" " " "(" "): " "\\s *\\(\\*\\s *\\)?$" ": "] 7 (#$ . 3332) (list current-prefix-arg (prompt-for-change-log-name))]) #@225 Find change log file in other window 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'. (defalias 'add-change-log-entry-other-window #[(&optional whoami file-name) " \n#" [add-change-log-entry whoami file-name t] 4 (#$ . 5027) (byte-code " D" [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 "   !!L!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 use-local-map change-log-mode-map make-local-variable paragraph-start "^\\s *$\\|^\f" paragraph-separate "^\\s *$\\|^\f\\|^\\sw" 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] 2 (#$ . 5476) 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) "P\nP\f!*" [paragraph-separate "\\|^\\s *\\s(" paragraph-start fill-paragraph justify] 3 (#$ . 6362) "P"]) #@76 *Heuristic regexp used by `add-log-current-defun' for unknown major modes. (defvar add-log-current-defun-header-regexp "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ ]*[:=]" (#$ . -6648)) #@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 "" [nil (byte-code "` >Amu `W!`Y!/u!w`!`{ >y`Zf=ZyK!)y`Zf=syd!w`!`{ >:y!ymu `W!ˉyo!yۏb!`fU!w`!`{6! 6`⏅6bo!y!)!y\f`Y)6`V6`!`{* >V#͔b`T`{ =l#ÔÕ{ =#ÔÕ{ = .##ux`!`{).2`Z#ÔÕ{)*" [location major-mode (emacs-lisp-mode lisp-mode scheme-mode lisp-interaction-mode) 1 beginning-of-defun end-of-defun forward-sexp -1 looking-at "\\s(" " " nil (c-mode c++-mode c++-c-mode objc-mode) 0 2 92 "[ ]*#[ ]*define[ ]" search-forward "define" " " (c-mode c++-mode c++-c-mode objc-mode) "{\\|\\(\\s *$\\)" backward-sexp tem beg "[ \n]" (byte-code "hU!y`!)& Y" [nil 92 2 backward-sexp 1 0 tem looking-at "DEFUN\\b" location] 2) ((error)) down-list 34 " ," "^[+-]" get-method-definition (byte-code "!!xŇ" [down-list 1 backward-up-list " " nil t] 2) ((error)) "[^\n\f]" (TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode) re-search-backward "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" t texinfo-mode "^@node[ ]+\\([^,\n]+\\)" perl-mode "^sub[ ]+\\([^ \n]+\\)" fortran-mode beginning-of-fortran-subprogram case-fold-search re-search-forward "^[ ]*\\(program\\|subroutine\\|function\\|[ a-z0-9*]*[ ]+function\\)" "[(\n]" add-log-current-defun-header-regexp 10000] 4) ((error))] 3 (#$ . 6840)]) (defalias 'get-method-definition-1 #[(end) "{\nQÕb" [md 1 end 0] 3]) (defalias 'get-method-definition #[nil "#!)#1!!.!! P*" ["[" md re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t get-method-definition-1 " " re-search-forward "^\\([-+]\\)[ \n\f ]*\\(([^)]*)\\)?\\s-*" "" looking-at "[{;]" "\\([A-Za-z_]*:?\\)\\s-*\\(([^)]*)\\)?[A-Za-z_]*[ \n\f ]*" "]"] 4]) (provide (quote add-log))