summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-12-03 15:03:30 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-12-03 15:03:30 +0000
commit974b73e83842d63b14512aa225cc53983a9b5d14 (patch)
tree462170d38cbb7057e98f08e8c612a9d30eeea0fd /lisp/emacs-lisp
parentd0104e754a241cf83811fef30195d41201de533c (diff)
parentf5be22a273892218aad1db32c43ba562a08f3925 (diff)
downloademacs-974b73e83842d63b14512aa225cc53983a9b5d14.tar.gz
Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned!
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-490 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-491 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-492 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-493 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-494 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-495 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-496 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-497 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-498 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-499 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-500 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-501 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-502 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-503 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-504 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-505 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-506 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-507 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-508 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-509 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-510 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-511 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-512 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-513 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-514 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-515 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-516 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-517 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-518 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-519 Update from CVS: etc/TUTORIAL.cn: Updated. * emacs@sv.gnu.org/emacs--devo--0--patch-520 Merge from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-521 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-522 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-523 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-524 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-525 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-526 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-527 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-528 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-529 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-530 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-531 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-532 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-533 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-534 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-535 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-161 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-162 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-163 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-164 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-165 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-166 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-167 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-168 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-169 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-170 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-588
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/authors.el3
-rw-r--r--lisp/emacs-lisp/bytecomp.el21
-rw-r--r--lisp/emacs-lisp/checkdoc.el2
-rw-r--r--lisp/emacs-lisp/cust-print.el6
-rw-r--r--lisp/emacs-lisp/easy-mmode.el4
-rw-r--r--lisp/emacs-lisp/find-func.el18
-rw-r--r--lisp/emacs-lisp/lisp.el64
-rw-r--r--lisp/emacs-lisp/lselect.el6
-rw-r--r--lisp/emacs-lisp/pp.el2
-rw-r--r--lisp/emacs-lisp/re-builder.el1
-rw-r--r--lisp/emacs-lisp/regexp-opt.el2
-rw-r--r--lisp/emacs-lisp/shadow.el14
12 files changed, 96 insertions, 47 deletions
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el
index db8c3d5d21a..3c2d937624e 100644
--- a/lisp/emacs-lisp/authors.el
+++ b/lisp/emacs-lisp/authors.el
@@ -43,6 +43,7 @@ files.")
(defconst authors-aliases
'(
("Andrew Csillag" "Drew Csillag")
+ ("Anna M. Bigatti" "Anna Bigatti")
("Barry A. Warsaw" "Barry A. Warsaw, Century Computing, Inc."
"Barry A. Warsaw, ITB" "Barry Warsaw")
("Bj,Av(Brn Torkelsson" "Bjorn Torkelsson")
@@ -176,7 +177,7 @@ listed.")
Changes to files in this list are not listed.")
(defconst authors-fixed-entries
- '(("Richard M. Stallman" :wrote "[The original GNU emacs and numerous files]")
+ '(("Richard M. Stallman" :wrote "[The original GNU Emacs and numerous files]")
("Joseph Arceneaux" :wrote "xrdb.c")
("Blitz Product Development Corporation" :wrote "ispell.el")
("Frank Bresz" :wrote "diff.el")
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 02a88c13973..6790f199206 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -264,11 +264,12 @@ facilities that have been added more recently."
;; this way can never be run in Emacs 18, and may even cause it to crash.")
(defcustom byte-optimize t
- "*Enables optimization in the byte compiler.
-nil means don't do any optimization.
-t means do all optimizations.
-`source' means do source-level optimizations only.
-`byte' means do code-level optimizations only."
+ "*Enable optimization in the byte compiler.
+Possible values are:
+ nil - no optimization
+ t - all optimizations
+ `source' - source-level optimizations only
+ `byte' - code-level optimizations only"
:group 'bytecomp
:type '(choice (const :tag "none" nil)
(const :tag "all" t)
@@ -336,7 +337,7 @@ If it is 'byte, then only byte-level optimizations will be logged."
(defcustom byte-compile-warnings t
"*List of warnings that the byte-compiler should issue (t for all).
-Elements of the list may be be:
+Elements of the list may be:
free-vars references to variables not in the current lexical scope.
unresolved calls to unknown functions.
@@ -2864,8 +2865,12 @@ That command is designed for interactive use only" fn))
(defmacro byte-compile-get-constant (const)
`(or (if (stringp ,const)
- (assoc-default ,const byte-compile-constants
- 'equal-including-properties nil)
+ ;; In a string constant, treat properties as significant.
+ (let (result)
+ (dolist (elt byte-compile-constants)
+ (if (equal-including-properties (car elt) ,const)
+ (setq result elt)))
+ result)
(assq ,const byte-compile-constants))
(car (setq byte-compile-constants
(cons (list ,const) byte-compile-constants)))))
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 666b373ca53..0bacbf1c683 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2155,7 +2155,7 @@ before using the Ispell engine on it."
(defun checkdoc-rogue-space-check-engine (&optional start end interact)
"Return a message list if there is a line with white space at the end.
If `checkdoc-autofix-flag' permits, delete that whitespace instead.
-If optional arguments START and END are non nil, bound the check to
+If optional arguments START and END are non-nil, bound the check to
this region.
Optional argument INTERACT may permit the user to fix problems on the fly."
(let ((p (point))
diff --git a/lisp/emacs-lisp/cust-print.el b/lisp/emacs-lisp/cust-print.el
index 332ea81932e..f37a5348552 100644
--- a/lisp/emacs-lisp/cust-print.el
+++ b/lisp/emacs-lisp/cust-print.el
@@ -256,7 +256,7 @@ Any pair that has the same PREDICATE is first removed."
(defun custom-print-install ()
"Replace print functions with general, customizable, Lisp versions.
-The emacs subroutines are saved away, and you can reinstall them
+The Emacs subroutines are saved away, and you can reinstall them
by running `custom-print-uninstall'."
(interactive)
(mapcar 'cust-print-set-function-cell
@@ -271,7 +271,7 @@ by running `custom-print-uninstall'."
t)
(defun custom-print-uninstall ()
- "Reset print functions to their emacs subroutines."
+ "Reset print functions to their Emacs subroutines."
(interactive)
(mapcar 'cust-print-set-function-cell
'((prin1 cust-print-original-prin1)
@@ -375,7 +375,7 @@ The argument used by %s must be a string or a symbol;
the argument used by %d, %b, %o, %x or %c must be a number.
This is the custom-print replacement for the standard `format'. It
-calls the emacs `format' after first making strings for list,
+calls the Emacs `format' after first making strings for list,
vector, or symbol args. The format specification for such args should
be `%s' in any case, so a string argument will also work. The string
is generated with `custom-prin1-to-string', which quotes quotable
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index b22e49dac34..de8f0a91af4 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -500,7 +500,7 @@ found, do widen first and then call NARROWFUN with no args after moving."
,(concat "^No \\(previous\\|next\\) " (regexp-quote name)))
(defun ,next-sym (&optional count)
,(format "Go to the next COUNT'th %s." name)
- (interactive)
+ (interactive "p")
(unless count (setq count 1))
(if (< count 0) (,prev-sym (- count))
(if (looking-at ,re) (setq count (1+ count)))
@@ -523,7 +523,7 @@ found, do widen first and then call NARROWFUN with no args after moving."
(put ',next-sym 'definition-name ',base)
(defun ,prev-sym (&optional count)
,(format "Go to the previous COUNT'th %s" (or name base-name))
- (interactive)
+ (interactive "p")
(unless count (setq count 1))
(if (< count 0) (,next-sym (- count))
(let (was-narrowed)
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 42c5d3183e7..a51493d22ea 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -147,9 +147,9 @@ See the functions `find-function' and `find-variable'."
(defun find-library-name (library)
"Return the absolute file name of the Lisp source of LIBRARY."
- ;; Strip off the extension to take advantage of library suffixes in
- ;; the call to `locate-file'.
- (if (string-match "\\.el\\(c\\(\\..*\\)?\\)?\\'" library)
+ ;; If the library is byte-compiled, try to find a source library by
+ ;; the same name.
+ (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
(setq library (replace-match "" t t library)))
(or (locate-file library
(or find-function-source-path load-path)
@@ -264,7 +264,7 @@ not selected. If the function definition can't be found in
the buffer, returns (BUFFER).
If the file where FUNCTION is defined is not known, then it is
-searched for in `find-function-source-path' if non nil, otherwise
+searched for in `find-function-source-path' if non-nil, otherwise
in `load-path'."
(if (not function)
(error "You didn't specify a function"))
@@ -357,7 +357,7 @@ places point before the definition.
Set mark before moving, if the buffer already existed.
The library where FUNCTION is defined is searched for in
-`find-function-source-path', if non nil, otherwise in `load-path'.
+`find-function-source-path', if non-nil, otherwise in `load-path'.
See also `find-function-recenter-line' and `find-function-after-hook'."
(interactive (find-function-read))
(find-function-do-it function nil 'switch-to-buffer))
@@ -387,7 +387,7 @@ the point of the definition. The buffer is not selected.
If the variable's definition can't be found in the buffer, return (BUFFER).
The library where VARIABLE is defined is searched for in FILE or
-`find-function-source-path', if non nil, otherwise in `load-path'."
+`find-function-source-path', if non-nil, otherwise in `load-path'."
(if (not variable)
(error "You didn't specify a variable")
(let ((library (or file
@@ -406,7 +406,7 @@ places point before the definition.
Set mark before moving, if the buffer already existed.
The library where VARIABLE is defined is searched for in
-`find-function-source-path', if non nil, otherwise in `load-path'.
+`find-function-source-path', if non-nil, otherwise in `load-path'.
See also `find-function-recenter-line' and `find-function-after-hook'."
(interactive (find-function-read 'defvar))
(find-function-do-it variable 'defvar 'switch-to-buffer))
@@ -436,7 +436,7 @@ variable, `defface' for a face. This function does not switch to the
buffer nor display it.
The library where SYMBOL is defined is searched for in FILE or
-`find-function-source-path', if non nil, otherwise in `load-path'."
+`find-function-source-path', if non-nil, otherwise in `load-path'."
(cond
((not symbol)
(error "You didn't specify a symbol"))
@@ -461,7 +461,7 @@ places point before the definition.
Set mark before moving, if the buffer already existed.
The library where FACE is defined is searched for in
-`find-function-source-path', if non nil, otherwise in `load-path'.
+`find-function-source-path', if non-nil, otherwise in `load-path'.
See also `find-function-recenter-line' and `find-function-after-hook'."
(interactive (find-function-read 'defface))
(find-function-do-it face 'defface 'switch-to-buffer))
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 29c70f8c344..6bc7da7ba28 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -208,22 +208,64 @@ is non-nil.
If variable `beginning-of-defun-function' is non-nil, its value
is called as a function to find the defun's beginning."
- (interactive "p")
- (if beginning-of-defun-function
- (if (> (setq arg (or arg 1)) 0)
- (dotimes (i arg)
- (funcall beginning-of-defun-function))
- ;; Better not call end-of-defun-function directly, in case
- ;; it's not defined.
- (end-of-defun (- arg)))
- (and arg (< arg 0) (not (eobp)) (forward-char 1))
+ (interactive "p") ; change this to "P", maybe, if we ever come to pass ARG
+ ; to beginning-of-defun-function.
+ (unless arg (setq arg 1)) ; The call might not be interactive.
+ (cond
+ (beginning-of-defun-function
+ (if (> arg 0)
+ (dotimes (i arg)
+ (funcall beginning-of-defun-function))
+ ;; Better not call end-of-defun-function directly, in case
+ ;; it's not defined.
+ (end-of-defun (- arg))))
+
+ ((or defun-prompt-regexp open-paren-in-column-0-is-defun-start)
+ (and (< arg 0) (not (eobp)) (forward-char 1))
(and (re-search-backward (if defun-prompt-regexp
(concat (if open-paren-in-column-0-is-defun-start
"^\\s(\\|" "")
"\\(?:" defun-prompt-regexp "\\)\\s(")
"^\\s(")
- nil 'move (or arg 1))
- (progn (goto-char (1- (match-end 0)))) t)))
+ nil 'move arg)
+ (progn (goto-char (1- (match-end 0)))) t))
+
+ (t
+ ;; Column 0 has no significance - so scan forward from BOB to see how
+ ;; nested point is, then carry on from there.
+ (let* ((floor (point-min))
+ (ceiling (point-max))
+ (pps-state (let (syntax-begin-function
+ font-lock-beginning-of-syntax-function)
+ (syntax-ppss)))
+ (nesting-depth (nth 0 pps-state)))
+ (save-restriction
+ (widen)
+ ;; Get outside of any string or comment.
+ (if (nth 8 pps-state)
+ (goto-char (nth 8 pps-state)))
+
+ (cond
+ ((> arg 0)
+ (when (> nesting-depth 0)
+ (up-list (- nesting-depth))
+ (setq arg (1- arg)))
+ ;; We're now outside of any defun.
+ (backward-list arg)
+ (if (< (point) floor) (goto-char floor)))
+
+ ((< arg 0)
+ (cond
+ ((> nesting-depth 0)
+ (up-list nesting-depth)
+ (setq arg (1+ arg)))
+ ((not (looking-at "\\s("))
+ ;; We're between defuns, and not at the start of one.
+ (setq arg (1+ arg))))
+ (forward-list (- arg))
+ (down-list)
+ (backward-char)
+ (if (> (point) ceiling) (goto-char ceiling)))))))))
(defvar end-of-defun-function nil
"If non-nil, function for function `end-of-defun' to call.
diff --git a/lisp/emacs-lisp/lselect.el b/lisp/emacs-lisp/lselect.el
index 1d40d2e8368..5aed4822818 100644
--- a/lisp/emacs-lisp/lselect.el
+++ b/lisp/emacs-lisp/lselect.el
@@ -191,7 +191,7 @@ secondary selection instead of the primary selection."
"If there is a selection, delete the text it covers, and copy it to
both the kill ring and the Clipboard."
(interactive)
- (or (x-selection-owner-p) (error "emacs does not own the primary selection"))
+ (or (x-selection-owner-p) (error "Emacs does not own the primary selection"))
(setq last-command nil)
(or primary-selection-extent
(error "the primary selection is not an extent?"))
@@ -205,7 +205,7 @@ both the kill ring and the Clipboard."
"If there is a selection, delete the text it covers *without* copying it to
the kill ring or the Clipboard."
(interactive)
- (or (x-selection-owner-p) (error "emacs does not own the primary selection"))
+ (or (x-selection-owner-p) (error "Emacs does not own the primary selection"))
(setq last-command nil)
(or primary-selection-extent
(error "the primary selection is not an extent?"))
@@ -219,7 +219,7 @@ the kill ring or the Clipboard."
"If there is a selection, copy it to both the kill ring and the Clipboard."
(interactive)
(setq last-command nil)
- (or (x-selection-owner-p) (error "emacs does not own the primary selection"))
+ (or (x-selection-owner-p) (error "Emacs does not own the primary selection"))
(or primary-selection-extent
(error "the primary selection is not an extent?"))
(save-excursion
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index a9cb2abd741..77f8854e022 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -161,7 +161,7 @@ Ignores leading comment characters."
(set-syntax-table stab)
(if arg
(insert (pp-to-string (eval exp)))
- (pp-eval-expression exp))))
+ (pp-eval-expression (eval exp)))))
;;; Test cases for quote
;; (pp-eval-expression ''(quote quote))
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 5dc67e4ac21..cae4be8addd 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -253,6 +253,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
(kill-all-local-variables)
(setq major-mode 'reb-mode
mode-name "RE Builder")
+ (set (make-local-variable 'blink-matching-paren) nil)
(use-local-map reb-mode-map)
(reb-mode-common)
(run-mode-hooks 'reb-mode-hook))
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index 52cbc956bc3..931ebf28bd2 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -88,7 +88,7 @@
;;;###autoload
(defun regexp-opt (strings &optional paren)
- "Return a regexp to match a string in STRINGS.
+ "Return a regexp to match a string in the list STRINGS.
Each string should be unique in STRINGS and should not contain any regexps,
quoted or not. If optional PAREN is non-nil, ensure that the returned regexp
is enclosed by at least one regexp grouping construct.
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index 5a2521ff7cb..7162aa822b7 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -184,17 +184,17 @@ and that each of these directories contains a file called XXX.el. Then
XXX.el in the site-lisp directory is referred to by all of:
\(require 'XXX\), \(autoload .... \"XXX\"\), \(load-library \"XXX\"\) etc.
-The first XXX.el file prevents emacs from seeing the second \(unless
-the second is loaded explicitly via load-file\).
+The first XXX.el file prevents Emacs from seeing the second \(unless
+the second is loaded explicitly via `load-file'\).
When not intended, such shadowings can be the source of subtle
problems. For example, the above situation may have arisen because the
-XXX package was not distributed with versions of emacs prior to
-19.30. An emacs maintainer downloaded XXX from elsewhere and installed
-it. Later, XXX was updated and included in the emacs distribution.
-Unless the emacs maintainer checks for this, the new version of XXX
+XXX package was not distributed with versions of Emacs prior to
+19.30. An Emacs maintainer downloaded XXX from elsewhere and installed
+it. Later, XXX was updated and included in the Emacs distribution.
+Unless the Emacs maintainer checks for this, the new version of XXX
will be hidden behind the old \(which may no longer work with the new
-emacs version\).
+Emacs version\).
This function performs these checks and flags all possible
shadowings. Because a .el file may exist without a corresponding .elc