diff options
| author | Dave Love | 1998-01-11 12:48:04 +0000 |
|---|---|---|
| committer | Dave Love | 1998-01-11 12:48:04 +0000 |
| commit | 6e24ad221a082d368670e4c4e92b3c9f78408b11 (patch) | |
| tree | 166465fec6343c3ce1d54d9e2ff3956994d67105 | |
| parent | a9d02884b48c78e658ab09fa5776e14b1aab157d (diff) | |
| download | emacs-6e24ad221a082d368670e4c4e92b3c9f78408b11.tar.gz emacs-6e24ad221a082d368670e4c4e92b3c9f78408b11.zip | |
(lm-get-package-name, lm-header,
lm-header-multiline, lm-summary, lm-version, lm-commentary):
Return string without properties.
(lm-get-header, lm-get-package-name, lm-crack-address,
lm-insert-at-column, lm-report-bug): Minor doc fixes.
| -rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 31048372d24..4e7fae47125 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers | 1 | ;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1994 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
| 6 | ;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com> | 6 | ;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com> |
| @@ -143,7 +143,7 @@ then $identifier: doc string $ is used by GNU ident(1)") | |||
| 143 | ;; These functions all parse the headers of the current buffer | 143 | ;; These functions all parse the headers of the current buffer |
| 144 | 144 | ||
| 145 | (defsubst lm-get-header-re (header &optional mode) | 145 | (defsubst lm-get-header-re (header &optional mode) |
| 146 | "Returns regexp for matching HEADER. | 146 | "Return regexp for matching HEADER. |
| 147 | If called with optional MODE and with value `section', | 147 | If called with optional MODE and with value `section', |
| 148 | return section regexp instead." | 148 | return section regexp instead." |
| 149 | (cond ((eq mode 'section) | 149 | (cond ((eq mode 'section) |
| @@ -152,14 +152,14 @@ return section regexp instead." | |||
| 152 | (concat lm-header-prefix header ":[ \t]*")))) | 152 | (concat lm-header-prefix header ":[ \t]*")))) |
| 153 | 153 | ||
| 154 | (defsubst lm-get-package-name () | 154 | (defsubst lm-get-package-name () |
| 155 | "Returns package name by looking at the first line." | 155 | "Return package name by looking at the first line." |
| 156 | (save-excursion | 156 | (save-excursion |
| 157 | (goto-char (point-min)) | 157 | (goto-char (point-min)) |
| 158 | (if (and (looking-at (concat lm-header-prefix)) | 158 | (if (and (looking-at (concat lm-header-prefix)) |
| 159 | (progn (goto-char (match-end 0)) | 159 | (progn (goto-char (match-end 0)) |
| 160 | (looking-at "\\([^\t ]+\\)") | 160 | (looking-at "\\([^\t ]+\\)") |
| 161 | (match-end 1))) | 161 | (match-end 1))) |
| 162 | (buffer-substring (match-beginning 1) (match-end 1)) | 162 | (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
| 163 | ))) | 163 | ))) |
| 164 | 164 | ||
| 165 | (defun lm-section-mark (header &optional after) | 165 | (defun lm-section-mark (header &optional after) |
| @@ -196,7 +196,7 @@ If AFTER is non-nil, return the location of the next line." | |||
| 196 | ;; RCS ident likes format "$identifier: data$" | 196 | ;; RCS ident likes format "$identifier: data$" |
| 197 | (looking-at "\\([^$\n]+\\)") | 197 | (looking-at "\\([^$\n]+\\)") |
| 198 | (match-end 1)) | 198 | (match-end 1)) |
| 199 | (buffer-substring (match-beginning 1) (match-end 1)) | 199 | (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
| 200 | nil))) | 200 | nil))) |
| 201 | 201 | ||
| 202 | (defun lm-header-multiline (header) | 202 | (defun lm-header-multiline (header) |
| @@ -215,7 +215,7 @@ The returned value is a list of strings, one per line." | |||
| 215 | (goto-char (match-end 0)) | 215 | (goto-char (match-end 0)) |
| 216 | (looking-at "\\(.*\\)")) | 216 | (looking-at "\\(.*\\)")) |
| 217 | (match-end 1)) | 217 | (match-end 1)) |
| 218 | (setq res (cons (buffer-substring | 218 | (setq res (cons (buffer-substring-no-properties |
| 219 | (match-beginning 1) | 219 | (match-beginning 1) |
| 220 | (match-end 1)) | 220 | (match-end 1)) |
| 221 | res)) | 221 | res)) |
| @@ -237,13 +237,13 @@ The returned value is a list of strings, one per line." | |||
| 237 | (looking-at lm-header-prefix) | 237 | (looking-at lm-header-prefix) |
| 238 | (progn (goto-char (match-end 0)) | 238 | (progn (goto-char (match-end 0)) |
| 239 | (looking-at "[^ ]+[ \t]+--+[ \t]+\\(.*\\)"))) | 239 | (looking-at "[^ ]+[ \t]+--+[ \t]+\\(.*\\)"))) |
| 240 | (buffer-substring (match-beginning 1) (match-end 1))) | 240 | (buffer-substring-no-properties (match-beginning 1) (match-end 1))) |
| 241 | (if file | 241 | (if file |
| 242 | (kill-buffer (current-buffer))) | 242 | (kill-buffer (current-buffer))) |
| 243 | ))) | 243 | ))) |
| 244 | 244 | ||
| 245 | (defun lm-crack-address (x) | 245 | (defun lm-crack-address (x) |
| 246 | "Split up an email address into full name and real email address. | 246 | "Split up an email address X into full name and real email address. |
| 247 | The value is a cons of the form (FULLNAME . ADDRESS)." | 247 | The value is a cons of the form (FULLNAME . ADDRESS)." |
| 248 | (cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x) | 248 | (cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x) |
| 249 | (cons (substring x (match-beginning 1) (match-end 1)) | 249 | (cons (substring x (match-beginning 1) (match-end 1)) |
| @@ -334,7 +334,7 @@ This can befound in an RCS or SCCS header to crack it out of." | |||
| 334 | (cond | 334 | (cond |
| 335 | ;; Look for an RCS header | 335 | ;; Look for an RCS header |
| 336 | ((re-search-forward "\\$[I]d: [^ ]+ \\([^ ]+\\) " header-max t) | 336 | ((re-search-forward "\\$[I]d: [^ ]+ \\([^ ]+\\) " header-max t) |
| 337 | (buffer-substring (match-beginning 1) (match-end 1))) | 337 | (buffer-substring-no-properties (match-beginning 1) (match-end 1))) |
| 338 | 338 | ||
| 339 | ;; Look for an SCCS header | 339 | ;; Look for an SCCS header |
| 340 | ((re-search-forward | 340 | ((re-search-forward |
| @@ -343,7 +343,7 @@ This can befound in an RCS or SCCS header to crack it out of." | |||
| 343 | (regexp-quote (file-name-nondirectory (buffer-file-name))) | 343 | (regexp-quote (file-name-nondirectory (buffer-file-name))) |
| 344 | "\t\\([012345679.]*\\)") | 344 | "\t\\([012345679.]*\\)") |
| 345 | header-max t) | 345 | header-max t) |
| 346 | (buffer-substring (match-beginning 1) (match-end 1))) | 346 | (buffer-substring-no-properties (match-beginning 1) (match-end 1))) |
| 347 | 347 | ||
| 348 | (t nil)))) | 348 | (t nil)))) |
| 349 | (if file | 349 | (if file |
| @@ -389,9 +389,9 @@ with tag `Commentary' and ends with tag `Change Log' or `History'." | |||
| 389 | ) | 389 | ) |
| 390 | (cond | 390 | (cond |
| 391 | ((and commentary change-log) | 391 | ((and commentary change-log) |
| 392 | (buffer-substring commentary change-log)) | 392 | (buffer-substring-no-properties commentary change-log)) |
| 393 | ((and commentary code) | 393 | ((and commentary code) |
| 394 | (buffer-substring commentary code)) | 394 | (buffer-substring-no-properties commentary code)) |
| 395 | (t | 395 | (t |
| 396 | nil))) | 396 | nil))) |
| 397 | (if file | 397 | (if file |
| @@ -401,7 +401,7 @@ with tag `Commentary' and ends with tag `Change Log' or `History'." | |||
| 401 | ;;; Verification and synopses | 401 | ;;; Verification and synopses |
| 402 | 402 | ||
| 403 | (defun lm-insert-at-column (col &rest strings) | 403 | (defun lm-insert-at-column (col &rest strings) |
| 404 | "Insert list of STRINGS, at column COL." | 404 | "Insert, at column COL, list of STRINGS." |
| 405 | (if (> (current-column) col) (insert "\n")) | 405 | (if (> (current-column) col) (insert "\n")) |
| 406 | (move-to-column col t) | 406 | (move-to-column col t) |
| 407 | (apply 'insert strings)) | 407 | (apply 'insert strings)) |
| @@ -528,7 +528,7 @@ which do not include a recognizable synopsis." | |||
| 528 | 528 | ||
| 529 | (defun lm-report-bug (topic) | 529 | (defun lm-report-bug (topic) |
| 530 | "Report a bug in the package currently being visited to its maintainer. | 530 | "Report a bug in the package currently being visited to its maintainer. |
| 531 | Prompts for bug subject. Leaves you in a mail buffer." | 531 | Prompts for bug subject TOPIC. Leaves you in a mail buffer." |
| 532 | (interactive "sBug Subject: ") | 532 | (interactive "sBug Subject: ") |
| 533 | (let ((package (lm-get-package-name)) | 533 | (let ((package (lm-get-package-name)) |
| 534 | (addr (lm-maintainer)) | 534 | (addr (lm-maintainer)) |