summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-05-20 17:44:36 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-05-20 17:44:36 +0000
commitb4bb3cbc7caca5c9c207d9ed42cacb978790af67 (patch)
tree6d347dbb4b2db074171d0bbcb89afe851cffe85b /lisp/emacs-lisp
parent35bc5d82600f330082298823f09f53259a90ea81 (diff)
parenta18ff9886771c41186eebf8d7984fee2120dbe36 (diff)
downloademacs-b4bb3cbc7caca5c9c207d9ed42cacb978790af67.tar.gz
emacs-b4bb3cbc7caca5c9c207d9ed42cacb978790af67.tar.bz2
emacs-b4bb3cbc7caca5c9c207d9ed42cacb978790af67.zip
Merged from miles@gnu.org--gnu-2005 (patch 69, 313-319)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-313 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-314 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-315 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-316 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-317 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-318 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-319 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-69 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-347
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/authors.el5
-rw-r--r--lisp/emacs-lisp/byte-run.el5
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/emacs-lisp/cl-extra.el2
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
-rw-r--r--lisp/emacs-lisp/cl-seq.el4
-rw-r--r--lisp/emacs-lisp/cl.el14
-rw-r--r--lisp/emacs-lisp/copyright.el38
-rw-r--r--lisp/emacs-lisp/easy-mmode.el23
-rw-r--r--lisp/emacs-lisp/eldoc.el6
-rw-r--r--lisp/emacs-lisp/lisp-mnt.el2
-rw-r--r--lisp/emacs-lisp/lisp.el9
-rw-r--r--lisp/emacs-lisp/re-builder.el2
-rw-r--r--lisp/emacs-lisp/testcover.el3
14 files changed, 57 insertions, 62 deletions
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el
index 8eb177dd9ca..6280af2fb72 100644
--- a/lisp/emacs-lisp/authors.el
+++ b/lisp/emacs-lisp/authors.el
@@ -1,6 +1,6 @@
;;; authors.el --- utility for maintaining Emacs' AUTHORS file -*-coding: iso-2022-7bit;-*-
-;; Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@gnu.org>
;; Maintainer: Kim F. Storm <storm@cua.dk>
@@ -597,8 +597,7 @@ buffer *Authors Errors* containing references to unknown files."
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
(error "Not the root directory of Emacs: %s" root))
(dolist (log logs)
- (when (and (string-match "ChangeLog\\(.[0-9]+\\)?$" log)
- (not (string-match "/lispref/" log)))
+ (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log)
(message "Scanning %s..." log)
(authors-scan-change-log log table)))
(let ((els (authors-process-lines "find" root "-name" "*.el")))
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 1472d576e49..7fc01901cfe 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -175,8 +175,9 @@ If you think you need this, you're probably making a mistake somewhere."
;;; byte-compile-macro-environment.
(defmacro eval-when-compile (&rest body)
- "Like `progn', but evaluates the body at compile time.
-The result of the body appears to the compiler as a quoted constant."
+ "Like `progn', but evaluates the body at compile time if you're compiling.
+Thus, the result of the body appears to the compiler as a quoted constant.
+In interpreted code, this is entirely equivalent to `progn'."
(declare (debug t) (indent 0))
;; Not necessary because we have it in b-c-initial-macro-environment
;; (list 'quote (eval (cons 'progn body)))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 970a64d062b..ac6093a4660 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2170,6 +2170,8 @@ list that represents a doc string reference.
(put 'custom-declare-variable 'byte-hunk-handler
'byte-compile-file-form-custom-declare-variable)
(defun byte-compile-file-form-custom-declare-variable (form)
+ (when (memq 'callargs byte-compile-warnings)
+ (byte-compile-nogroup-warn form))
(when (memq 'free-vars byte-compile-warnings)
(push (nth 1 (nth 1 form)) byte-compile-bound-variables))
(let ((tail (nthcdr 4 form)))
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index bfd21e27d05..727e45b1289 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -61,7 +61,7 @@ TYPE is a Common Lisp type specifier."
;;; Predicates.
(defun equalp (x y)
- "T if two Lisp objects have similar structures and contents.
+ "Return t if two Lisp objects have similar structures and contents.
This is like `equal', except that it accepts numerically equal
numbers of different types (float vs. integer), and also compares
strings case-insensitively."
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index aae2fd9f3d8..a585c7e52e6 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1335,7 +1335,7 @@ Unlike `flet', this macro is fully compliant with the Common Lisp standard.
;; The following ought to have a better definition for use with newer
;; byte compilers.
(defmacro macrolet (bindings &rest body)
- "Make temporary macro defns.
+ "Make temporary macro definitions.
This is like `flet', but for macros instead of functions.
\(fn ((NAME ARGLIST BODY...) ...) FORM...)"
@@ -1351,7 +1351,7 @@ This is like `flet', but for macros instead of functions.
cl-macro-environment))))))
(defmacro symbol-macrolet (bindings &rest body)
- "Make symbol macro defns.
+ "Make symbol macro definitions.
Within the body FORMs, references to the variable NAME will be replaced
by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 93237f0206f..cb202700a00 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -800,7 +800,7 @@ Keywords supported: :test :test-not :key"
(apply 'nset-difference cl-list2 cl-list1 cl-keys)))))
(defun subsetp (cl-list1 cl-list2 &rest cl-keys)
- "True if LIST1 is a subset of LIST2.
+ "Return true if LIST1 is a subset of LIST2.
I.e., if every element of LIST1 also appears in LIST2.
Keywords supported: :test :test-not :key"
(cond ((null cl-list1) t) ((null cl-list2) nil)
@@ -888,7 +888,7 @@ Keywords supported: :test :test-not :key"
(setq cl-tree (cdr cl-tree))))))
(defun tree-equal (cl-x cl-y &rest cl-keys)
- "T if trees X and Y have `eql' leaves.
+ "Return t if trees X and Y have `eql' leaves.
Atoms are compared by `eql'; cons cells are compared recursively.
Keywords supported: :test :test-not :key"
(cl-parsing-keywords (:test :test-not :key) ()
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 2f6c799f528..11835629bd7 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -115,7 +115,7 @@ a future Emacs interpreter will be able to use it.")
;;; Predicates.
(defun eql (a b) ; See compiler macro in cl-macs.el
- "T if the two args are the same Lisp object.
+ "Return t if the two args are the same Lisp object.
Floating-point numbers of equal value are `eql', but they may not be `eq'."
(if (numberp a)
(equal a b)
@@ -301,25 +301,25 @@ definitions to shadow the loaded ones for use in file byte-compilation."
;;; Numbers.
(defun floatp-safe (x)
- "T if OBJECT is a floating point number.
+ "Return t if OBJECT is a floating point number.
On Emacs versions that lack floating-point support, this function
always returns nil."
(and (numberp x) (not (integerp x))))
(defun plusp (x)
- "T if NUMBER is positive."
+ "Return t if NUMBER is positive."
(> x 0))
(defun minusp (x)
- "T if NUMBER is negative."
+ "Return t if NUMBER is negative."
(< x 0))
(defun oddp (x)
- "T if INTEGER is odd."
+ "Return t if INTEGER is odd."
(eq (logand x 1) 1))
(defun evenp (x)
- "T if INTEGER is even."
+ "Return t if INTEGER is even."
(eq (logand x 1) 0))
(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
@@ -503,7 +503,7 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp
;; x))
(defun list* (arg &rest rest) ; See compiler macro in cl-macs.el
- "Return a new list with specified args as elements, cons'd to last arg.
+ "Return a new list with specified args as elements, consed to last arg.
Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
`(cons A (cons B (cons C D)))'."
(cond ((not rest) arg)
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 30c76b8769a..c2e394bf15b 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -185,25 +185,24 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
(widen)
(goto-char (point-min))
(if (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
- (let ((s (match-beginning 2)) (e (make-marker))
+ (let ((s (match-beginning 2))
+ (e (copy-marker (1+ (match-end 2))))
+ (p (make-marker))
last)
- (set-marker e (1+ (match-end 2)))
(goto-char s)
- ;; Back up one character so that our search can match the first year.
- (backward-char 1)
- (while (and (< (point) (marker-position e))
- (re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]"
- (marker-position e) t))
- (let ((p (point))
- (sep (match-string 1))
- (year (string-to-number (match-string 2))))
- (goto-char (1+ (match-beginning 0)))
- (unless (= (char-syntax (string-to-char sep)) ?\s)
+ (while (re-search-forward "[0-9]+" e t)
+ (set-marker p (point))
+ (goto-char (match-beginning 0))
+ (let ((sep (char-before))
+ (year (string-to-number (match-string 0))))
+ (when (and sep
+ (/= (char-syntax sep) ?\s)
+ (/= sep ?-))
(insert " "))
- (if (< year 100)
- (insert (if (>= year 50) "19" "20")))
- (goto-char p)
- (setq last p)))
+ (when (< year 100)
+ (insert (if (>= year 50) "19" "20"))))
+ (goto-char p)
+ (setq last p))
(when last
(goto-char last)
;; Don't mess up whitespace after the years.
@@ -211,12 +210,11 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
(save-restriction
(narrow-to-region (point-min) (point))
(let ((fill-prefix " "))
- (fill-region s last)))
- )
+ (fill-region s last))))
(set-marker e nil)
+ (set-marker p nil)
(copyright-update nil t))
- (message "No copyright message")
- (goto-char (point-min))))
+ (message "No copyright message")))
;;;###autoload
(define-skeleton copyright
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index a02f7be7d13..0892af1bb35 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -36,7 +36,6 @@
;; For each mode, easy-mmode defines the following:
;; <mode> : The minor mode predicate. A buffer-local variable.
;; <mode>-map : The keymap possibly associated to <mode>.
-;; <mode>-hook : The hook run at the end of the toggle function.
;; see `define-minor-mode' documentation
;;
;; eval
@@ -90,7 +89,7 @@ replacing its case-insensitive matches with the literal string in LIGHTER."
(defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body)
"Define a new minor mode MODE.
This function defines the associated control variable MODE, keymap MODE-map,
-toggle command MODE, and hook MODE-hook.
+and toggle command MODE.
DOC is the documentation for the mode toggle command.
Optional INIT-VALUE is the initial value of the mode's variable.
@@ -103,11 +102,11 @@ The above three arguments can be skipped if keyword arguments are
used (see below).
BODY contains code that will be executed each time the mode is (dis)activated.
- It will be executed after any toggling but before running the hooks.
- Before the actual body code, you can write
- keyword arguments (alternating keywords and values).
- These following keyword arguments are supported (other keywords
- will be passed to `defcustom' if the minor mode is global):
+ It will be executed after any toggling but before running the hook variable
+ `mode-HOOK'.
+ Before the actual body code, you can write keyword arguments (alternating
+ keywords and values). These following keyword arguments are supported (other
+ keywords will be passed to `defcustom' if the minor mode is global):
:group GROUP Custom group name to use in all generated `defcustom' forms.
Defaults to MODE without the possible trailing \"-mode\".
Don't use this default group name unless you have written a
@@ -241,12 +240,6 @@ With zero or negative ARG turn mode off.
;; up-to-here.
:autoload-end
- ;; The toggle's hook.
- (defcustom ,hook nil
- ,(format "Hook run at the end of function `%s'." mode-name)
- ,@group
- :type 'hook)
-
;; Define the minor-mode keymap.
,(unless (symbolp keymap) ;nil is also a symbol.
`(defvar ,keymap-sym
@@ -323,8 +316,8 @@ in which `%s' turns it on."
(with-current-buffer buf
(if ,global-mode (,turn-on) (when ,mode (,mode -1))))))
- ;; Autoloading easy-mmode-define-global-mode
- ;; autoloads everything up-to-here.
+ ;; Autoloading define-global-minor-mode autoloads everything
+ ;; up-to-here.
:autoload-end
;; List of buffers left to process.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 1546d078aea..bf6b601ef7a 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -141,9 +141,9 @@ truncated to make more of the arglist or documentation string visible."
"Toggle ElDoc mode on or off.
In ElDoc mode, the echo area displays information about a
function or variable in the text where point is. If point is
-on a documented variable, it displays that variable's doc string.
-Otherwise it displays the argument list of the function called
-in the expression point is on.
+on a documented variable, it displays the first line of that
+variable's doc string. Otherwise it displays the argument list
+of the function called in the expression point is on.
With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
:group 'eldoc :lighter eldoc-minor-mode-string
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 701da1c4dec..a385a32935e 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -418,7 +418,7 @@ ISO-DATE non-nil means return the date in ISO 8601 format."
(format "%s-%s-%s" yyyy mm dd)
(format "%s %s %s"
dd
- (nth (string-to-int mm)
+ (nth (string-to-number mm)
'("" "Jan" "Feb" "Mar" "Apr" "May" "Jun"
"Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))
yyyy))))))
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index f9442bc0084..955bc4499bc 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -1,6 +1,7 @@
;;; lisp.el --- Lisp editing commands for Emacs
-;; Copyright (C) 1985, 86, 1994, 2000, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1994, 2000, 2004, 2005
+;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: lisp, languages
@@ -487,9 +488,9 @@ If region is active, insert enclosing characters at region boundaries."
More accurately, check the narrowed part of the buffer for unbalanced
expressions (\"sexps\") in general. This is done according to the
current syntax table and will find unbalanced brackets or quotes as
-appropriate. (See Info node `(emacs)Lists and Sexps'.) If imbalance
-is found, an error is signalled and point is left at the first
-unbalanced character."
+appropriate. (See Info node `(emacs)Parentheses'.) If imbalance is
+found, an error is signalled and point is left at the first unbalanced
+character."
(interactive)
(condition-case data
;; Buffer can't have more than (point-max) sexps.
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 1c8d12fef0e..a2aed39d00a 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -557,7 +557,7 @@ optional fourth argument FORCE is non-nil."
(interactive)
(setq reb-subexp-displayed
- (or subexp (string-to-int (format "%c" last-command-char))))
+ (or subexp (string-to-number (format "%c" last-command-char))))
(reb-update-modestring)
(reb-do-update reb-subexp-displayed))
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index 23e9a54b1bb..f77b1a00e2c 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -147,7 +147,8 @@ call to one of the `testcover-1value-functions'."
(defcustom testcover-potentially-1value-functions
'(add-hook and beep or remove-hook unless when)
"Functions that are potentially 1-valued. No brown splotch if actually
-1-valued, no error if actually multi-valued.")
+1-valued, no error if actually multi-valued."
+ :group 'testcover)
(defface testcover-nohits-face
'((t (:background "DeepPink2")))