Commit 6e24ad22 authored by Dave Love's avatar Dave Love

(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.
parent a9d02884
;;; 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>
......@@ -143,7 +143,7 @@ then $identifier: doc string $ is used by GNU ident(1)")
;; 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)
......@@ -152,14 +152,14 @@ return section regexp instead."
(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)
......@@ -196,7 +196,7 @@ If AFTER is non-nil, return the location of the next line."
;; 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)
......@@ -215,7 +215,7 @@ The returned value is a list of strings, one per line."
(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))
......@@ -237,13 +237,13 @@ The returned value is a list of strings, one per line."
(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))
......@@ -334,7 +334,7 @@ This can befound in an RCS or SCCS header to crack it out of."
(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
......@@ -343,7 +343,7 @@ This can befound in an RCS or SCCS header to crack it out of."
(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
......@@ -389,9 +389,9 @@ with tag `Commentary' and ends with tag `Change Log' or `History'."
)
(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
......@@ -401,7 +401,7 @@ with tag `Commentary' and ends with tag `Change Log' or `History'."
;;; 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))
......@@ -528,7 +528,7 @@ which do not include a recognizable synopsis."
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment