;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers
-;; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com>
;; These functions all parse the headers of the current buffer
(defsubst lm-get-header-re (header &optional mode)
- "Returns regexp for matching HEADER.
+ "Return regexp for matching HEADER.
If called with optional MODE and with value `section',
return section regexp instead."
(cond ((eq mode 'section)
(concat lm-header-prefix header ":[ \t]*"))))
(defsubst lm-get-package-name ()
- "Returns package name by looking at the first line."
+ "Return package name by looking at the first line."
(save-excursion
(goto-char (point-min))
(if (and (looking-at (concat lm-header-prefix))
(progn (goto-char (match-end 0))
(looking-at "\\([^\t ]+\\)")
(match-end 1)))
- (buffer-substring (match-beginning 1) (match-end 1))
+ (buffer-substring-no-properties (match-beginning 1) (match-end 1))
)))
(defun lm-section-mark (header &optional after)
;; RCS ident likes format "$identifier: data$"
(looking-at "\\([^$\n]+\\)")
(match-end 1))
- (buffer-substring (match-beginning 1) (match-end 1))
+ (buffer-substring-no-properties (match-beginning 1) (match-end 1))
nil)))
(defun lm-header-multiline (header)
(goto-char (match-end 0))
(looking-at "\\(.*\\)"))
(match-end 1))
- (setq res (cons (buffer-substring
+ (setq res (cons (buffer-substring-no-properties
(match-beginning 1)
(match-end 1))
res))
(looking-at lm-header-prefix)
(progn (goto-char (match-end 0))
(looking-at "[^ ]+[ \t]+--+[ \t]+\\(.*\\)")))
- (buffer-substring (match-beginning 1) (match-end 1)))
+ (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
(if file
(kill-buffer (current-buffer)))
)))
(defun lm-crack-address (x)
- "Split up an email address into full name and real email address.
+ "Split up an email address X into full name and real email address.
The value is a cons of the form (FULLNAME . ADDRESS)."
(cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x)
(cons (substring x (match-beginning 1) (match-end 1))
(cond
;; Look for an RCS header
((re-search-forward "\\$[I]d: [^ ]+ \\([^ ]+\\) " header-max t)
- (buffer-substring (match-beginning 1) (match-end 1)))
+ (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
;; Look for an SCCS header
((re-search-forward
(regexp-quote (file-name-nondirectory (buffer-file-name)))
"\t\\([012345679.]*\\)")
header-max t)
- (buffer-substring (match-beginning 1) (match-end 1)))
+ (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
(t nil))))
(if file
)
(cond
((and commentary change-log)
- (buffer-substring commentary change-log))
+ (buffer-substring-no-properties commentary change-log))
((and commentary code)
- (buffer-substring commentary code))
+ (buffer-substring-no-properties commentary code))
(t
nil)))
(if file
;;; Verification and synopses
(defun lm-insert-at-column (col &rest strings)
- "Insert list of STRINGS, at column COL."
+ "Insert, at column COL, list of STRINGS."
(if (> (current-column) col) (insert "\n"))
(move-to-column col t)
(apply 'insert strings))
(defun lm-report-bug (topic)
"Report a bug in the package currently being visited to its maintainer.
-Prompts for bug subject. Leaves you in a mail buffer."
+Prompts for bug subject TOPIC. Leaves you in a mail buffer."
(interactive "sBug Subject: ")
(let ((package (lm-get-package-name))
(addr (lm-maintainer))