;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Sun Mar 3 04:30:51 1996 ;;; from file /home/fsf/rms/e19/lisp/lisp-mnt.el ;;; emacs version 19.30.91.2. ;;; 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.29"))) (error "`lisp-mnt.el' was compiled for Emacs 19.29 or later")) (byte-code "ÀÁ!ˆÀÂ!‡" [require picture emacsbug] 2) #@338 Prefix that is ignored before the tag. For example, you can write the 1st line synopsis string and headers like this in your Lisp package: ;; @(#) package.el -- pacakge description ;; ;; @(#) $Maintainer: Person Foo Bar $ The @(#) construct is used by unix what(1) and then $identifier: doc string $ is used by GNU ident(1) (defvar lm-header-prefix "^;;*[ ]+\\(@(#)\\)?[ ]*\\([$]\\)?" (#$ . 527)) #@43 Column used for placing formatted output. (defvar lm-comment-column 16 (#$ . 945)) #@54 Regexp which matches start of documentation section. (defvar lm-commentary-header "Commentary\\|Documentation" (#$ . 1034)) #@53 Regexp which matches the start of code log section. (defvar lm-history-header "Change Log\\|History" (#$ . 1164)) #@123 Returns regexp for matching HEADER. If called with optional MODE and with value `section', return section regexp instead. (defalias 'lm-get-header-re #[(header &optional mode) "Á=ƒ  ÄQ‡ ÆQ‡" [mode section "^;;;;* " header ":[ ]*$" lm-header-prefix ":[ ]*"] 3 (#$ . 1285)]) (put (quote lm-get-header-re) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@52 Returns package name by looking at the first line. (defalias 'lm-get-package-name #[nil "ŠebˆÀ °!…•bˆÀÃ!ˆÄ•…Ĕĕ{)‡" [looking-at lm-header-prefix 0 "\\([^ ]+\\)" 1] 2 (#$ . 1659)]) (put (quote lm-get-package-name) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@173 Return the buffer location of a given section start marker. The HEADER is the section mark string to search for. If AFTER is non-nil, return the location of the next line. (defalias 'lm-section-mark #[(header &optional after) "ŠÀebˆÂ Ä Ä=ƒÆ ÇQ‚ ÉQ*ÊÀ#…0Ëyˆ\fƒ/Íyˆ`*‡" [t case-fold-search re-search-forward header section mode "^;;;;* " ":[ ]*$" lm-header-prefix ":[ ]*" nil 0 after 1] 4 (#$ . 1946)]) #@56 Return the buffer location of the `Code' start marker. (defalias 'lm-code-mark #[nil "ÀÁ!‡" [lm-section-mark "Code"] 2 (#$ . 2367)]) (put (quote lm-code-mark) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@62 Return the buffer location of the `Commentary' start marker. (defalias 'lm-commentary-mark #[nil "À !‡" [lm-section-mark lm-commentary-header] 2 (#$ . 2591)]) (put (quote lm-commentary-mark) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@59 Return the buffer location of the `History' start marker. (defalias 'lm-history-mark #[nil "À !‡" [lm-section-mark lm-history-header] 2 (#$ . 2847)]) (put (quote lm-history-mark) (quote byte-optimizer) (quote byte-compile-inline-expand)) #@49 Return the contents of the header named HEADER. (defalias 'lm-header #[(header) "ebˆÀ Ä Æ=ƒÇ ÈQ‚ ÊQ*ËÌ!À#…5ÍÎ!…5Ï•…5ϔϕ{)‡" [t case-fold-search re-search-forward header nil mode section "^;;;;* " ":[ ]*$" lm-header-prefix ":[ ]*" lm-section-mark "Code" looking-at "\\([^$\n]+\\)" 1] 4 (#$ . 3091)]) #@129 Return the contents of the header named HEADER, with continuation lines. The returned value is a list of strings, one per line. (defalias 'lm-header-multiline #[(header) "ŠebˆÀ !‰ƒ7\nCÃyˆÄ ÆP!ƒ7Ç•bˆÄÈ!ƒ7Õƒ7ÔÕ{\nBÃyˆ‚\n*‡" [lm-header header res 1 looking-at lm-header-prefix "[ ]+" 0 "\\(.*\\)"] 4 (#$ . 3413)]) #@77 Return the one-line summary of file FILE, or current buffer if FILE is nil. (defalias 'lm-summary #[(&optional file) "Šƒ Á!ˆebˆÂ !…!Ä•bˆÂÅ!…!Ɣƕ{ƒ)Çp!ˆ)‡" [file find-file looking-at lm-header-prefix 0 "[^ ]+[ ]+--+[ ]+\\(.*\\)" 1 kill-buffer] 3 (#$ . 3743)]) #@120 Split up an email address into full name and real email address. The value is a cons of the form (FULLNAME . ADDRESS). (defalias 'lm-crack-address #[(x) "ÀÁ\n\"ƒ\nÔÕO\nĔĕOB‡ÀÅ\n\"ƒ*\nĔĕO\nÔÕOB‡ÀÆ\n\"ƒ5Ç\nB‡\nÇB‡" [string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x 1 2 "\\(\\S-+@\\S-+\\) [(<]\\(.*\\)[>)]" "\\S-+@\\S-+" nil] 4 (#$ . 4019)]) #@163 Return the author list of file FILE, or current buffer if FILE is nil. Each element of the list is a cons; the car is the full name, the cdr is an email address. (defalias 'lm-authors #[(&optional file) "Šƒ Á!ˆÂÃ!ÅÆ\f\"ƒÇp!ˆ*‡" [file find-file lm-header-multiline "author" authorlist mapcar lm-crack-address kill-buffer] 3 (#$ . 4380)]) #@119 Return the maintainer of file FILE, or current buffer if FILE is nil. The return value has the form (NAME . ADDRESS). (defalias 'lm-maintainer #[(&optional file) "Šƒ Á!ˆÂÃ!‰ƒÅ\f!‚Æ @)ƒ#Çp!ˆ)‡" [file find-file lm-header "maintainer" maint lm-crack-address lm-authors kill-buffer] 4 (#$ . 4731)]) #@79 Return the created date given in file FILE, or current buffer if FILE is nil. (defalias 'lm-creation-date #[(&optional file) "Šƒ Á!ˆÂÃ!ƒÄp!ˆ)‡" [file find-file lm-header "created" kill-buffer] 3 (#$ . 5042)]) #@78 Return the modify-date given in file FILE, or current buffer if FILE is nil. (defalias 'lm-last-modified-date #[(&optional file) "Šƒ Á!ˆebˆÂÃÄÅ!Æ#…,ÇÈɔɕ{Ê˔˕{!Ì8͔͕{$ƒ4Îp!ˆ)‡" [file find-file re-search-forward "\\$Id: [^ ]+ [^ ]+ \\([^/]+\\)/\\([^/]+\\)/\\([^ ]+\\) " lm-section-mark "Code" t format "%s %s %s" 3 string-to-int 2 ("" "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec") 1 kill-buffer] 6 (#$ . 5263)]) #@137 Return the version listed in file FILE, or current buffer if FILE is nil. This can befound in an RCS or SCCS header to crack it out of. (defalias 'lm-version #[(&optional file) "Šƒ Á!ˆÂÃ!†EÄÅ!ebˆÇÈÉ#ƒ(ʔʕ{‚DÇËÌ!ËÍÎ !!ÏQÉ#ƒCʔʕ{‚DÐ)ƒMÑp!ˆ)‡" [file find-file lm-header "version" lm-section-mark "Code" header-max re-search-forward "\\$Id: [^ ]+ \\([^ ]+\\) " t 1 regexp-quote "@(#)" file-name-nondirectory buffer-file-name " \\([012345679.]*\\)" nil kill-buffer] 5 (#$ . 5717)]) #@75 Return the keywords given in file FILE, or current buffer if FILE is nil. (defalias 'lm-keywords #[(&optional file) "Šƒ Á!ˆÂÃ!‰…\f—)ƒÅp!ˆ)‡" [file find-file lm-header "keywords" keywords kill-buffer] 4 (#$ . 6218)]) #@154 Return the adapted-by names in file FILE, or current buffer if FILE is nil. This is the name of the person who cleaned up this package for distribution. (defalias 'lm-adapted-by #[(&optional file) "Šƒ Á!ˆÂÃ!ƒÄp!ˆ)‡" [file find-file lm-header "adapted-by" kill-buffer] 3 (#$ . 6450)]) #@209 Return the commentary in file FILE, or current buffer if FILE is nil. The value is returned as a string. In the text, the commentary starts with tag `Commentary' and ends with tag `Change Log' or `History'. (defalias 'lm-commentary #[(&optional file) "Šƒ Á!ˆÂ !Â\f!ÂÅ!‰ƒ)ƒ){‚<ƒ;ƒ;{‚<É+ƒEÊp!ˆ)‡" [file find-file lm-section-mark lm-commentary-header lm-history-header "Code" code change-log commentary nil kill-buffer] 5 (#$ . 6747)]) #@40 Insert list of STRINGS, at column COL. (defalias 'lm-insert-at-column #[(col &rest strings) "iVƒ ÁcˆÂ!ˆÃÄ \"‡" [col "\n" move-to-column-force apply insert strings] 3 (#$ . 7218)]) #@161 Check that the current buffer (or FILE if given) is in proper format. If FILE is a directory, recurse on its files and generate a report in a temporary buffer. (defalias 'lm-verify #[(&optional file showok &optional verb) "†tÁÁƒÄ ƒ-Æ !ƒ-ÇÈÉ!!ˆÊ ˆËÌÍ !\"‚ÆŠ ƒ6Î !ˆŠebˆÏ°!…UÑ•bˆÏÒ!ˆÓ•…UÓ”Ó•{)‰„_Ô‚¼Õ „hÖ‚¼× „qØ‚¼Ù „zÚ‚¼Û „ƒÜ‚¼Ý!„Žß‚¼Ý !„™á‚¼Ýâ!„£ã‚¼dbˆäå æç °Áè#„»éê \"‚¼\n ƒÄëp!ˆ)ƒÎì\n!ˆ\n+‡" [verb nil ret name "Ok." file file-directory-p switch-to-buffer get-buffer-create "*lm-verify*" erase-buffer mapcar #[(f) "ÀÁ\n\"…-Ã\n!‰ƒ\nűˆÆ\fÈ#‚, …,\nűˆÆÊ\")‡" [string-match ".*\\.el$" f lm-verify status ":" lm-insert-at-column lm-comment-column "\n" showok "OK\n"] 5] directory-files find-file looking-at lm-header-prefix 0 "\\([^ ]+\\)" 1 "Can't find a package NAME" lm-authors "Author: tag missing." lm-maintainer "Maintainer: tag missing." lm-summary "Can't find a one-line 'Summary' description" lm-keywords "Keywords: tag missing." lm-section-mark lm-commentary-header "Can't find a 'Commentary' section marker." lm-history-header "Can't find a 'History' section marker." "Code" "Can't find a 'Code' section marker" re-search-backward "^;;;[ ]+" "[ ]+ends here[ ]*$" "\\|^;;;[ ]+ End of file[ ]+" t format "Can't find a footer line for [%s]" kill-buffer message] 7 (#$ . 7408) nil]) #@263 Generate a synopsis listing for the buffer or the given FILE if given. If FILE is a directory, recurse on its files and generate a report in a temporary buffer. If SHOWALL is non-nil, also generate a line for files which do not include a recognizable synopsis. (defalias 'lm-synopsis #[(&optional file showall) "ƒÁ!ƒÂÃÄ!!ˆÅ ˆÆÇÈ!\"‡Šƒ#É!ˆÊ ƒ-Ëp!ˆ)‡" [file file-directory-p switch-to-buffer get-buffer-create "*lm-verify*" erase-buffer mapcar #[(f) "ÀÁ\n\"…-Ã\n!‰ƒ\nűˆÆ\fÈ#‚, …,\nűˆÆÊ\")‡" [string-match ".*\\.el$" f lm-synopsis syn ":" lm-insert-at-column lm-comment-column "\n" showall "NA\n"] 5] directory-files find-file lm-summary kill-buffer] 4 (#$ . 8767) (list (read-file-name "Synopsis for (file or dir): "))]) #@127 Report a bug in the package currently being visited to its maintainer. Prompts for bug subject. Leaves you in a mail buffer. (defalias 'lm-report-bug #[(topic) "ŠebˆÀ °!…•bˆÀÃ!ˆÄ•…Ĕĕ{)Å Æ  Ê˃<@ÌAÍR‚>#ˆdbˆÐ ƒTÑP‚UÒÓ±ˆÔÕÖ!!+‡" [looking-at lm-header-prefix 0 "\\([^ ]+\\)" 1 lm-maintainer lm-version version addr package mail nil " <" ">" bug-gnu-emacs topic "\nIn " " version " "" "\n\n" message substitute-command-keys "Type \\[mail-send] to send bug report."] 6 (#$ . 9521) "sBug Subject: "]) (provide (quote lisp-mnt))