summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-12-10 16:56:50 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-12-10 16:56:50 -0800
commit8f50130c565eaf0ad7c49e4ad044c3291ecdfa71 (patch)
treec8129448cbbf387fe82667ccac02983592c688f1 /lisp/emacs-lisp
parent85a83e2e2585a1906dec5168ed96ad521b5849ed (diff)
parent7b9d523a07395ecea505be88f45c33d73aea7038 (diff)
downloademacs-8f50130c565eaf0ad7c49e4ad044c3291ecdfa71.tar.gz
Merge from trunk.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/advice.el12
-rw-r--r--lisp/emacs-lisp/assoc.el7
-rw-r--r--lisp/emacs-lisp/autoload.el16
-rw-r--r--lisp/emacs-lisp/avl-tree.el66
-rw-r--r--lisp/emacs-lisp/byte-opt.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el17
-rw-r--r--lisp/emacs-lisp/cconv.el8
-rw-r--r--lisp/emacs-lisp/chart.el2
-rw-r--r--lisp/emacs-lisp/checkdoc.el2
-rw-r--r--lisp/emacs-lisp/cl-indent.el16
-rw-r--r--lisp/emacs-lisp/easy-mmode.el8
-rw-r--r--lisp/emacs-lisp/edebug.el2
-rw-r--r--lisp/emacs-lisp/eieio-base.el2
-rw-r--r--lisp/emacs-lisp/eieio.el4
-rw-r--r--lisp/emacs-lisp/elint.el6
-rw-r--r--lisp/emacs-lisp/ert.el2
-rw-r--r--lisp/emacs-lisp/lisp-mode.el3
-rw-r--r--lisp/emacs-lisp/package.el9
-rw-r--r--lisp/emacs-lisp/smie.el2
-rw-r--r--lisp/emacs-lisp/syntax.el4
-rw-r--r--lisp/emacs-lisp/tabulated-list.el2
-rw-r--r--lisp/emacs-lisp/testcover.el2
22 files changed, 101 insertions, 93 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 8527bc9e640..ae2900775ac 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -625,12 +625,12 @@
;;
;; (ad-activate-regexp "^ange-ftp-")
;;
-;; A saver way would have been to use
+;; A safer way would have been to use
;;
;; (ad-update-regexp "^ange-ftp-")
;;
;; instead which would have only reactivated currently actively advised
-;; functions, but not functions that were currently deactivated. All these
+;; functions, but not functions that were currently inactive. All these
;; functions can also be called interactively.
;; A certain piece of advice is considered a match if its name contains a
@@ -833,7 +833,7 @@
;; Reactivate an advised function but only if its advice is currently
;; active. This can be used to bring all currently advised function up
;; to date with the current state of advice without also activating
-;; currently deactivated functions.
+;; currently inactive functions.
;; - Caching:
;; Is the saving of an advised definition and an identifying cache-id so
;; it can be reused, for example, for activation after deactivation.
@@ -853,7 +853,7 @@
;; - ad-activate to activate the advice of a FUNCTION
;; - ad-deactivate to deactivate the advice of a FUNCTION
;; - ad-update to activate the advice of a FUNCTION unless it was not
-;; yet activated or is currently deactivated.
+;; yet activated or is currently inactive.
;; - ad-unadvise deactivates a FUNCTION and removes all of its advice
;; information, hence, it cannot be activated again
;; - ad-recover tries to redefine a FUNCTION to its original definition and
@@ -1261,7 +1261,7 @@
;; contain some advice matched by the regular expression. This is a save
;; way to update the activation of advised functions whose advice changed
;; in some way or other without accidentally also activating currently
-;; deactivated functions:
+;; inactive functions:
;;
;; (ad-update-regexp "^fg-")
;; nil
@@ -1608,7 +1608,7 @@
;; fii
;;
;; Now we advise `fii' to use an optional second argument that controls the
-;; amount of incrementation. A list following the (optional) position
+;; amount of incrementing. A list following the (optional) position
;; argument of the advice will be interpreted as an argument list
;; specification. This means you cannot specify an empty argument list, and
;; why would you want to anyway?
diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el
index 31be851f2dd..e650995d3fe 100644
--- a/lisp/emacs-lisp/assoc.el
+++ b/lisp/emacs-lisp/assoc.el
@@ -61,10 +61,9 @@ pair is not at the head of alist. ALIST is not altered."
(defun aput (alist-symbol key &optional value)
- "Inserts a key-value pair into an alist.
+ "Insert a key-value pair into an alist.
The alist is referenced by ALIST-SYMBOL. The key-value pair is made
-from KEY and optionally, VALUE. Returns the altered alist or nil if
-ALIST is nil.
+from KEY and optionally, VALUE. Returns the altered alist.
If the key-value pair referenced by KEY can be found in the alist, and
VALUE is supplied non-nil, then the value of KEY will be set to VALUE.
@@ -78,7 +77,7 @@ of the alist (with value nil if VALUE is nil or not supplied)."
(setq alist (symbol-value alist-symbol))
(cond ((null alist) (set alist-symbol elem))
((anot-head-p alist key) (set alist-symbol (nconc elem alist)))
- (value (setcar alist (car elem)))
+ (value (setcar alist (car elem)) alist)
(t alist))))
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index b3ac23b2b76..19a4d44273d 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -446,7 +446,11 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
generated-autoload-load-name
(autoload-file-load-name absfile)))
(when (and outfile
- (not (equal outfile (autoload-generated-file))))
+ (not
+ (if (memq system-type '(ms-dos windows-nt))
+ (equal (downcase outfile)
+ (downcase (autoload-generated-file)))
+ (equal outfile (autoload-generated-file)))))
(setq otherbuf t))
(save-excursion
(save-restriction
@@ -512,15 +516,7 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
(when output-start
(let ((secondary-autoloads-file-buf
- (if (local-variable-p 'generated-autoload-file)
- (current-buffer))))
- ;; Ignore a buffer-local setting if it points to the
- ;; global value. Otherwise we end up writing a mix of md5s
- ;; and time-stamps to the global file. (Bug#10049)
- (and secondary-autoloads-file-buf
- outfile
- (not otherbuf)
- (setq secondary-autoloads-file-buf nil))
+ (if otherbuf (current-buffer))))
(with-current-buffer (marker-buffer output-start)
(save-excursion
;; Insert the section-header line which lists the file name
diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el
index e8b7a1f9a8b..bc1efc118ef 100644
--- a/lisp/emacs-lisp/avl-tree.el
+++ b/lisp/emacs-lisp/avl-tree.el
@@ -74,7 +74,7 @@
cmpfun)
(defmacro avl-tree--root (tree)
- ;; Return the root node for an avl-tree. INTERNAL USE ONLY.
+ ;; Return the root node for an AVL tree. INTERNAL USE ONLY.
`(avl-tree--node-left (avl-tree--dummyroot ,tree)))
(defsetf avl-tree--root (tree) (node)
@@ -206,7 +206,7 @@ Return t if the height of the tree has shrunk."
Return cons cell (SHRUNK . DATA), where SHRUNK is t if the
height of the tree has shrunk and nil otherwise, and DATA is
-the releted data."
+the related data."
(let ((br (avl-tree--node-branch root branch)))
(cond
;; DATA not in tree.
@@ -372,7 +372,7 @@ itself."
;;; INTERNAL USE ONLY
(defun avl-tree--do-copy (root)
- "Copy the avl tree with ROOT as root. Highly recursive."
+ "Copy the AVL tree with ROOT as root. Highly recursive."
(if (null root)
nil
(avl-tree--node-create
@@ -401,7 +401,7 @@ itself."
;; front of the STACK, until a leaf is reached.
(let ((node (car (avl-tree--stack-store stack)))
(dir (if (avl-tree--stack-reverse stack) 1 0)))
- (when node ; check for emtpy stack
+ (when node ; check for empty stack
(while (setq node (avl-tree--node-branch node dir))
(push node (avl-tree--stack-store stack))))))
@@ -411,21 +411,21 @@ itself."
;; define public alias for constructors so that we can set docstring
(defalias 'avl-tree-create 'avl-tree--create
- "Create an empty avl tree.
+ "Create an empty AVL tree.
COMPARE-FUNCTION is a function which takes two arguments, A and B,
and returns non-nil if A is less than B, and nil otherwise.")
(defalias 'avl-tree-compare-function 'avl-tree--cmpfun
- "Return the comparison function for the avl tree TREE.
+ "Return the comparison function for the AVL tree TREE.
\(fn TREE)")
(defun avl-tree-empty (tree)
- "Return t if avl tree TREE is emtpy, otherwise return nil."
+ "Return t if AVL tree TREE is empty, otherwise return nil."
(null (avl-tree--root tree)))
(defun avl-tree-enter (tree data &optional updatefun)
- "Insert DATA into the avl tree TREE.
+ "Insert DATA into the AVL tree TREE.
If an element that matches DATA (according to the tree's
comparison function, see `avl-tree-create') already exists in
@@ -433,8 +433,8 @@ TREE, it will be replaced by DATA by default.
If UPDATEFUN is supplied and an element matching DATA already
exists in TREE, UPDATEFUN is called with two arguments: DATA, and
-the matching element. Its return value replaces the existing
-element. This value *must* itself match DATA (and hence the
+the matching element. Its return value replaces the existing
+element. This value *must* itself match DATA (and hence the
pre-existing data), or an error will occur.
Returns the new data."
@@ -443,7 +443,7 @@ Returns the new data."
0 data updatefun)))
(defun avl-tree-delete (tree data &optional test nilflag)
- "Delete the element matching DATA from the avl tree TREE.
+ "Delete the element matching DATA from the AVL tree TREE.
Matching uses the comparison function previously specified in
`avl-tree-create' when TREE was created.
@@ -456,7 +456,7 @@ distinguished from the case of a successfully deleted null
element.
If supplied, TEST specifies a test that a matching element must
-pass before it is deleted. If a matching element is found, it is
+pass before it is deleted. If a matching element is found, it is
passed as an argument to TEST, and is deleted only if the return
value is non-nil."
(cdr (avl-tree--do-delete (avl-tree--cmpfun tree)
@@ -465,14 +465,14 @@ value is non-nil."
(defun avl-tree-member (tree data &optional nilflag)
- "Return the element in the avl tree TREE which matches DATA.
+ "Return the element in the AVL tree TREE which matches DATA.
Matching uses the comparison function previously specified in
`avl-tree-create' when TREE was created.
If there is no such element in the tree, nil is
-returned. Optional argument NILFLAG specifies a value to return
-instead of nil in this case. This allows non-existent elements to
-be distinguished from a null element. (See also
+returned. Optional argument NILFLAG specifies a value to return
+instead of nil in this case. This allows non-existent elements to
+be distinguished from a null element. (See also
`avl-tree-member-p', which does this for you.)"
(let ((node (avl-tree--root tree))
(compare-function (avl-tree--cmpfun tree)))
@@ -488,15 +488,15 @@ be distinguished from a null element. (See also
(defun avl-tree-member-p (tree data)
- "Return t if an element matching DATA exists in the avl tree TREE,
-otherwise return nil. Matching uses the comparison function
+ "Return t if an element matching DATA exists in the AVL tree TREE.
+Otherwise return nil. Matching uses the comparison function
previously specified in `avl-tree-create' when TREE was created."
(let ((flag '(nil)))
(not (eq (avl-tree-member tree data flag) flag))))
(defun avl-tree-map (__map-function__ tree &optional reverse)
- "Modify all elements in the avl tree TREE by applying FUNCTION.
+ "Modify all elements in the AVL tree TREE by applying FUNCTION.
Each element is replaced by the return value of FUNCTION applied
to that element.
@@ -512,7 +512,7 @@ descending order if REVERSE is non-nil."
(defun avl-tree-mapc (__map-function__ tree &optional reverse)
- "Apply FUNCTION to all elements in avl tree TREE,
+ "Apply FUNCTION to all elements in AVL tree TREE,
for side-effect only.
FUNCTION is applied to the elements in ascending order, or
@@ -526,7 +526,7 @@ descending order if REVERSE is non-nil."
(defun avl-tree-mapf
(__map-function__ combinator tree &optional reverse)
- "Apply FUNCTION to all elements in avl tree TREE,
+ "Apply FUNCTION to all elements in AVL tree TREE,
and combine the results using COMBINATOR.
The FUNCTION is applied and the results are combined in ascending
@@ -545,7 +545,7 @@ order, or descending order if REVERSE is non-nil."
(defun avl-tree-mapcar (__map-function__ tree &optional reverse)
- "Apply FUNCTION to all elements in avl tree TREE,
+ "Apply FUNCTION to all elements in AVL tree TREE,
and make a list of the results.
The FUNCTION is applied and the list constructed in ascending
@@ -578,7 +578,7 @@ is more efficient."
(avl-tree--node-data node))))
(defun avl-tree-copy (tree)
- "Return a copy of the avl tree TREE."
+ "Return a copy of the AVL tree TREE."
(let ((new-tree (avl-tree-create (avl-tree--cmpfun tree))))
(setf (avl-tree--root new-tree) (avl-tree--do-copy (avl-tree--root tree)))
new-tree))
@@ -600,7 +600,7 @@ is more efficient."
treesize))
(defun avl-tree-clear (tree)
- "Clear the avl tree TREE."
+ "Clear the AVL tree TREE."
(setf (avl-tree--root tree) nil))
@@ -617,8 +617,8 @@ calling `avl-tree-stack-pop' will give unpredictable results).
Operations on these objects are significantly more efficient than
constructing a real stack with `avl-tree-flatten' and using
-standard stack functions. As such, they can be useful in
-implementing efficient algorithms of AVL trees. However, in cases
+standard stack functions. As such, they can be useful in
+implementing efficient algorithms of AVL trees. However, in cases
where mapping functions `avl-tree-mapc', `avl-tree-mapcar' or
`avl-tree-mapf' would be sufficient, it is better to use one of
those instead."
@@ -629,11 +629,11 @@ those instead."
(defun avl-tree-stack-pop (avl-tree-stack &optional nilflag)
"Pop the first element from AVL-TREE-STACK.
-\(See also `avl-tree-stack'\).
+\(See also `avl-tree-stack').
-Returns nil if the stack is empty, or NILFLAG if specified. (The
-latter allows an empty stack to be distinguished from a null
-element stored in the AVL tree.)"
+Returns nil if the stack is empty, or NILFLAG if specified.
+\(The latter allows an empty stack to be distinguished from
+a null element stored in the AVL tree.)"
(let (node next)
(if (not (setq node (pop (avl-tree--stack-store avl-tree-stack))))
nilflag
@@ -650,9 +650,9 @@ element stored in the AVL tree.)"
"Return the first element of AVL-TREE-STACK, without removing it
from the stack.
-Returns nil if the stack is empty, or NILFLAG if specified. (The
-latter allows an empty stack to be distinguished from a null
-element stored in the AVL tree.)"
+Returns nil if the stack is empty, or NILFLAG if specified.
+\(The latter allows an empty stack to be distinguished from
+a null element stored in the AVL tree.)"
(or (car (avl-tree--stack-store avl-tree-stack))
nilflag))
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 0630f5f4e4e..c9027fb663d 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -135,7 +135,7 @@
;; We'd have to notice defvars and defconsts, since those variables should
;; always be dynamic, and attempting to do a lexical binding of them
;; should simply do a dynamic binding instead.
-;; But! We need to know about variables that were not necessarily defvarred
+;; But! We need to know about variables that were not necessarily defvared
;; in the file being compiled (doing a boundp check isn't good enough.)
;; Fdefvar() would have to be modified to add something to the plist.
;;
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 096e91ea4fb..9aa230cfe9b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -178,9 +178,9 @@ adds `c' to it; otherwise adds `.elc'."
;; This can be the 'byte-compile property of any symbol.
(autoload 'byte-compile-inline-expand "byte-opt")
-;; This is the entrypoint to the lapcode optimizer pass1.
+;; This is the entry point to the lapcode optimizer pass1.
(autoload 'byte-optimize-form "byte-opt")
-;; This is the entrypoint to the lapcode optimizer pass2.
+;; This is the entry point to the lapcode optimizer pass2.
(autoload 'byte-optimize-lapcode "byte-opt")
(autoload 'byte-compile-unfold-lambda "byte-opt")
@@ -359,10 +359,12 @@ else the global value will be modified."
"List of commands that are not meant to be called from Lisp.")
(defvar byte-compile-not-obsolete-vars nil
- "If non-nil, a list of variables that shouldn't be reported as obsolete.")
+ "List of variables that shouldn't be reported as obsolete.")
+(defvar byte-compile-global-not-obsolete-vars nil
+ "Global list of variables that shouldn't be reported as obsolete.")
(defvar byte-compile-not-obsolete-funcs nil
- "If non-nil, a list of functions that shouldn't be reported as obsolete.")
+ "List of functions that shouldn't be reported as obsolete.")
(defcustom byte-compile-generate-call-tree nil
"Non-nil means collect call-graph information when compiling.
@@ -1113,7 +1115,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(unless (and funcp (memq symbol byte-compile-not-obsolete-funcs))
(byte-compile-warn "`%s' is an obsolete %s%s%s" symbol
(if funcp "function" "variable")
- (if asof (concat " (as of Emacs " asof ")") "")
+ (if asof (concat " (as of " asof ")") "")
(cond ((stringp instead)
(concat "; " instead))
(instead
@@ -2195,7 +2197,7 @@ list that represents a doc string reference.
(byte-compile-keep-pending form)))))
;; Functions and variables with doc strings must be output separately,
-;; so make-docfile can recognise them. Most other things can be output
+;; so make-docfile can recognize them. Most other things can be output
;; as byte-code.
(put 'autoload 'byte-hunk-handler 'byte-compile-file-form-autoload)
@@ -3030,6 +3032,7 @@ That command is designed for interactive use only" fn))
((let ((od (get var 'byte-obsolete-variable)))
(and od
(not (memq var byte-compile-not-obsolete-vars))
+ (not (memq var byte-compile-global-not-obsolete-vars))
(or (case (nth 1 od)
(set (not (eq access-type 'reference)))
(get (eq access-type 'reference))
@@ -4116,7 +4119,7 @@ binding slots have been popped."
(byte-defop-compiler-1 make-obsolete-variable)
(defun byte-compile-make-obsolete-variable (form)
(when (eq 'quote (car-safe (nth 1 form)))
- (push (nth 1 (nth 1 form)) byte-compile-not-obsolete-vars))
+ (push (nth 1 (nth 1 form)) byte-compile-global-not-obsolete-vars))
(byte-compile-normal-call form))
(defun byte-compile-defvar (form)
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index c6e157be776..daafd2226ec 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -67,7 +67,7 @@
;; TODO: (not just for cconv but also for the lexbind changes in general)
;; - let (e)debug find the value of lexical variables from the stack.
-;; - make eval-region do the eval-sexp-add-defvars danse.
+;; - make eval-region do the eval-sexp-add-defvars dance.
;; - byte-optimize-form should be applied before cconv.
;; OTOH, the warnings emitted by cconv-analyze need to come before optimize
;; since afterwards they can because obnoxious (warnings about an "unused
@@ -507,7 +507,7 @@ places where they originally did not directly appear."
(defalias 'byte-compile-not-lexical-var-p 'boundp))
(defun cconv--analyse-use (vardata form varkind)
- "Analyse the use of a variable.
+ "Analyze the use of a variable.
VARDATA should be (BINDER READ MUTATED CAPTURED CALLED).
VARKIND is the name of the kind of variable.
FORM is the parent form that binds this var."
@@ -559,7 +559,7 @@ FORM is the parent form that binds this var."
(t (let ((varstruct (list arg nil nil nil nil)))
(push (cons (list arg) (cdr varstruct)) newvars)
(push varstruct newenv)))))
- (dolist (form body) ;Analyse body forms.
+ (dolist (form body) ;Analyze body forms.
(cconv-analyse-form form newenv))
;; Summarize resulting data about arguments.
(dolist (vardata newvars)
@@ -612,7 +612,7 @@ and updates the data stored in ENV."
(push (cons binder (cdr varstruct)) newvars)
(push varstruct env))))
- (dolist (form body-forms) ; Analyse body forms.
+ (dolist (form body-forms) ; Analyze body forms.
(cconv-analyse-form form env))
(dolist (vardata newvars)
diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el
index 75e7d62f395..e9f2ec54601 100644
--- a/lisp/emacs-lisp/chart.el
+++ b/lisp/emacs-lisp/chart.el
@@ -169,7 +169,7 @@ Make sure the width/height is correct."
:initform t)
(name-face :initarg :name-face
:initform 'bold)
- (labels-face :initarg :lables-face
+ (labels-face :initarg :labels-face
:initform 'italic)
(chart :initarg :chart
:initform nil)
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index c9e32023187..9b708d4bbd2 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2118,7 +2118,7 @@ before using the Ispell engine on it."
;; Find out how we spell-check this word.
(if (or
;; All caps w/ option th, or s tacked on the end
- ;; for pluralization or numberthness.
+ ;; for pluralization or number.
(string-match "^[A-Z][A-Z]+\\(s\\|th\\)?$" word)
(looking-at "}") ; a keymap expression
)
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 287bb531538..81af2030ebe 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -159,12 +159,16 @@ is set to `defun'.")
(current-column))))
(goto-char indent-point)
(beginning-of-line)
- (cond ((not (extended-loop-p (elt state 1)))
- (+ loop-indentation lisp-simple-loop-indentation))
- ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
- (+ loop-indentation lisp-loop-keyword-indentation))
- (t
- (+ loop-indentation lisp-loop-forms-indentation)))))
+ (list
+ (cond ((not (extended-loop-p (elt state 1)))
+ (+ loop-indentation lisp-simple-loop-indentation))
+ ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
+ (+ loop-indentation lisp-loop-keyword-indentation))
+ (t
+ (+ loop-indentation lisp-loop-forms-indentation)))
+ ;; Tell the caller that the next line needs recomputation, even
+ ;; though it doesn't start a sexp.
+ loop-indentation)))
;; Cf (info "(elisp)Specification List")
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index bf9f2c9d6ed..fae4d9adc38 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -233,10 +233,10 @@ or call the function `%s'."))))
(defun ,modefun (&optional arg ,@extra-args)
,(or doc
(format (concat "Toggle %s on or off.
-Interactively, with no prefix argument, toggle the mode.
-With universal prefix ARG turn mode on.
-With zero or negative ARG turn mode off.
-\\{%s}") pretty-name keymap-sym))
+With a prefix argument ARG, enable %s if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+\\{%s}") pretty-name pretty-name keymap-sym))
;; Use `toggle' rather than (if ,mode 0 1) so that using
;; repeat-command still does the toggling correctly.
(interactive (list (or current-prefix-arg 'toggle)))
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 86c7e59fd07..d7cfcfb870a 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3448,7 +3448,7 @@ instrumented. Then it does `edebug-on-entry' and switches to `go' mode."
(defun edebug-on-entry (function &optional flag)
"Cause Edebug to stop when FUNCTION is called.
With prefix argument, make this temporary so it is automatically
-cancelled the first time the function is entered."
+canceled the first time the function is entered."
(interactive "aEdebug on entry to: \nP")
;; Could store this in the edebug data instead.
(put function 'edebug-on-entry (if flag 'temp t)))
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index df57148962f..278dff0f085 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -178,7 +178,7 @@ only one object ever exists."
;; calculate path names relative to a given instance. This will
;; make the saved object location independent by converting all file
;; references to be relative to the directory the object is saved to.
-;; You must call `eieio-peristent-path-relative' on each file name
+;; You must call `eieio-persistent-path-relative' on each file name
;; saved in your object.
(defclass eieio-persistent ()
((file :initarg :file
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 5e29a85d386..170d3fb0bf8 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -57,7 +57,7 @@
(eval-and-compile
;; About the above. EIEIO must process its own code when it compiles
-;; itself, thus, by eval-and-compiling outselves, we solve the problem.
+;; itself, thus, by eval-and-compiling ourselves, we solve the problem.
;; Compatibility
(if (fboundp 'compiled-function-arglist)
@@ -992,7 +992,7 @@ if default value is nil."
;; EML - Note: the only reason to override a class bound slot
;; is to change the default, so allow unbound in.
- ;; If we have a repeat, only update the vlaue...
+ ;; If we have a repeat, only update the value...
(eieio-perform-slot-validation-for-default a tp value skipnil)
(setcar dp value))
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index 0b8aa034500..ce6f8348a6b 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -296,7 +296,7 @@ If necessary, this first calls `elint-initialize'."
(elint-display-log)
(elint-set-mode-line t)
(mapc 'elint-top-form (elint-update-env))
- ;; Tell the user we're finished. This is terribly klugy: we set
+ ;; Tell the user we're finished. This is terribly kludgy: we set
;; elint-top-form-logged so elint-log-message doesn't print the
;; ** top form ** header...
(elint-set-mode-line)
@@ -335,7 +335,7 @@ Will be local in linted buffers.")
Is measured in buffer-modified-ticks and is local in linted buffers.")
;; This is a minor optimization. It is local to every buffer, and so
-;; does not prevent recursive requirs. It does not list the requires
+;; does not prevent recursive requires. It does not list the requires
;; of requires.
(defvar elint-features nil
"List of all libraries this buffer has required, or that have been provided.")
@@ -1098,7 +1098,7 @@ optional prefix argument REINIT is non-nil."
;; This includes all the built-in and dumped things with documentation.
(defun elint-scan-doc-file ()
"Scan the DOC file for function and variables.
-Marks the function wih their arguments, and returns a list of variables."
+Marks the function with their arguments, and returns a list of variables."
;; Cribbed from help-fns.el.
(let ((docbuf " *DOC*")
vars sym args)
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 8b64cd84bb1..820519e92d8 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -392,7 +392,7 @@ DATA is displayed to the user and should state the reason of the failure."
;; compiling doesn't depend on cl and thus doesn't need an
;; environment arg for `macroexpand'.
(if (fboundp 'cl-macroexpand)
- ;; Suppress warning about run-time call to cl funtion: we
+ ;; Suppress warning about run-time call to cl function: we
;; only call it if it's fboundp.
(with-no-warnings
(cl-macroexpand form (and (boundp 'cl-macro-environment)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 9408c0a3c9d..44e87e171d1 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -131,6 +131,7 @@
(put 'autoload 'doc-string-elt 3)
(put 'defun 'doc-string-elt 3)
(put 'defun* 'doc-string-elt 3)
+(put 'defmethod 'doc-string-elt 3)
(put 'defvar 'doc-string-elt 3)
(put 'defcustom 'doc-string-elt 3)
(put 'deftheme 'doc-string-elt 2)
@@ -769,7 +770,7 @@ this command arranges for all errors to enter the debugger."
Reset the `defvar' and `defcustom' variables to the initial value.
Reinitialize the face according to the `defface' specification."
;; The code in edebug-defun should be consistent with this, but not
- ;; the same, since this gets a macroexpended form.
+ ;; the same, since this gets a macroexpanded form.
(cond ((not (listp form))
form)
((and (eq (car form) 'defvar)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 0bd37ce1d49..a1513039a98 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -113,6 +113,8 @@
;;; ToDo:
+;; - a trust mechanism, since compiling a package can run arbitrary code.
+;; For example, download package signatures and check that they match.
;; - putting info dirs at the start of the info path means
;; users see a weird ordering of categories. OTOH we want to
;; override later entries. maybe emacs needs to enforce
@@ -224,7 +226,10 @@ Each element has the form (ID . LOCATION).
LOCATION specifies the base location for the archive.
If it starts with \"http:\", it is treated as a HTTP URL;
otherwise it should be an absolute directory name.
- (Other types of URL are currently not supported.)"
+ (Other types of URL are currently not supported.)
+
+Only add locations that you trust, since fetching and installing
+a package can run arbitrary code."
:type '(alist :key-type (string :tag "Archive name")
:value-type (string :tag "URL or directory name"))
:risky t
@@ -277,7 +282,7 @@ contrast, `package-user-dir' contains packages for personal use."
:version "24.1")
;; The value is precomputed in finder-inf.el, but don't load that
-;; until it's needed (i.e. when `package-intialize' is called).
+;; until it's needed (i.e. when `package-initialize' is called).
(defvar package--builtins nil
"Alist of built-in packages.
The actual value is initialized by loading the library
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index d43ba6c0d3e..afc8c7faa47 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -579,7 +579,7 @@ PREC2 is a table as returned by `smie-precs->prec2' or
(smie-debug--describe-cycle
table (smie-debug--prec2-cycle csts)))))
(incf i 10))
- ;; Propagate equalities back to their source.
+ ;; Propagate equality constraints back to their sources.
(dolist (eq (nreverse eqs))
(when (null (cadr eq))
;; There's an equality constraint, but we still haven't given
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index c65cbc39eab..85fa4772eb6 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -56,7 +56,7 @@
;; syntax-ppss-flush-cache since that would not only flush the cache but also
;; reset syntax-propertize--done which should not be done in this case).
"Mode-specific function to apply the syntax-table properties.
-Called with 2 arguments: START and END.
+Called with two arguments: START and END.
This function can call `syntax-ppss' on any position before END, but it
should not call `syntax-ppss-flush-cache', which means that it should not
call `syntax-ppss' on some position and later modify the buffer on some
@@ -248,7 +248,7 @@ Note: back-references in REGEXPs do not work."
(if syntax
(put-text-property
mb me 'syntax-table syntax))))))))
-
+
(if (or (not (cddr rule)) (zerop gn))
(setq code (nconc (nreverse thiscode) code))
(push `(if (match-beginning ,gn)
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index e16970c6804..32ec2bbf7ee 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -146,7 +146,7 @@ If ADVANCE is non-nil, move forward by one line afterwards."
(defvar tabulated-list-glyphless-char-display
(let ((table (make-char-table 'glyphless-char-display nil)))
(set-char-table-parent table glyphless-char-display)
- ;; Some text terminals can't display the unicode arrows; be safe.
+ ;; Some text terminals can't display the Unicode arrows; be safe.
(aset table 9650 (cons nil "^"))
(aset table 9660 (cons nil "v"))
table)
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index 8f991575eda..a5a6f71d79e 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -220,7 +220,7 @@ non-nil, byte-compiles each function after instrumenting."
(defun testcover-reinstrument (form)
"Reinstruments FORM to use testcover instead of edebug. This
function modifies the list that FORM points to. Result is nil if
-FORM should return multiple vlues, t if should always return same
+FORM should return multiple values, t if should always return same
value, 'maybe if either is acceptable."
(let ((fun (car-safe form))
id val)