diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 18 | ||||
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 7 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-indent.el | 4 | ||||
-rw-r--r-- | lisp/emacs-lisp/crm.el | 19 | ||||
-rw-r--r-- | lisp/emacs-lisp/debug.el | 4 | ||||
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/edebug.el | 6 | ||||
-rw-r--r-- | lisp/emacs-lisp/elp.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 6 | ||||
-rw-r--r-- | lisp/emacs-lisp/macroexp.el | 10 | ||||
-rw-r--r-- | lisp/emacs-lisp/pp.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/testcover.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/timer.el | 7 | ||||
-rw-r--r-- | lisp/emacs-lisp/trace.el | 2 |
14 files changed, 55 insertions, 39 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 68d1287d98c..7dbf61c5bf3 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -1,7 +1,7 @@ ;; autoload.el --- maintain autoloads in loaddefs.el -;; Copyright (C) 1991,92,93,94,95,96,97, 2001,02,03,04 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, +;; 2004, 2005 Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org> ;; Keywords: maint @@ -123,7 +123,17 @@ or macro definition or a defcustom)." ) `(progn (defvar ,varname ,init ,doc) - (custom-autoload ',varname ,file)))) + (custom-autoload ',varname ,file) + ;; The use of :require in a defcustom can be annoying, especially + ;; when defcustoms are moved from one file to another between + ;; releases because the :require arg gets placed in the user's + ;; .emacs. In order for autoloaded minor modes not to need the + ;; use of :require, we arrange to store their :setter. + ,(let ((setter (condition-case nil + (cadr (memq :set form)) + (error nil)))) + (if (equal setter ''custom-set-minor-mode) + `(put ',varname 'custom-set 'custom-set-minor-mode)))))) ;; nil here indicates that this is not a special autoload form. (t nil)))) @@ -566,5 +576,5 @@ Calls `update-directory-autoloads' on the command line arguments." (provide 'autoload) -;;; arch-tag: 00244766-98f4-4767-bf42-8a22103441c6 +;; arch-tag: 00244766-98f4-4767-bf42-8a22103441c6 ;;; autoload.el ends here diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 3948dae610b..cc472a00a30 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -193,7 +193,7 @@ (defgroup bytecomp nil - "Emacs Lisp byte-compiler" + "Emacs Lisp byte-compiler." :group 'lisp) (defcustom emacs-lisp-file-regexp (if (eq system-type 'vax-vms) @@ -1248,7 +1248,10 @@ extra args." (defun byte-compile-nogroup-warn (form) (let ((keyword-args (cdr (cdr (cdr (cdr form))))) (name (cadr form))) - (or (plist-get keyword-args :group) + (or (not (eq (car-safe name) 'quote)) + (and (eq (car form) 'custom-declare-group) + (equal name ''emacs)) + (plist-get keyword-args :group) (not (and (consp name) (eq (car name) 'quote))) (byte-compile-warn "%s for `%s' fails to specify containing group" diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index a203155673c..22c2460c16f 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -49,13 +49,13 @@ ;;; Code: (defgroup lisp-indent nil - "Indentation in Lisp" + "Indentation in Lisp." :group 'lisp) (defcustom lisp-indent-maximum-backtracking 3 "*Maximum depth to backtrack out from a sublist for structured indentation. -If this variable is 0, no backtracking will occur and forms such as flet +If this variable is 0, no backtracking will occur and forms such as `flet' may not be correctly indented." :type 'integer :group 'lisp-indent) diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 572c658d0fc..d5d385c2c7b 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -197,9 +197,10 @@ If an element is found, bind: respectively, and return t." - (let* ((minibuffer-string (buffer-string)) - (end-index (or (string-match "," minibuffer-string (1- (point))) - (1- (point-max)))) + (let* ((prompt-end (minibuffer-prompt-end)) + (minibuffer-string (buffer-substring prompt-end (point-max))) + (end-index (or (string-match "," minibuffer-string (- (point) prompt-end)) + (- (point-max) prompt-end))) (target-string (substring minibuffer-string 0 end-index)) (index (or (string-match (concat crm-separator "\\([^" crm-separator "]*\\)$") @@ -213,9 +214,10 @@ and return t." (progn ;; (setq crm-beginning-of-element (match-beginning 1)) - (setq crm-end-of-element end-index) + (setq crm-end-of-element (+ end-index prompt-end)) ;; string to the left of the current element - (setq crm-left-of-element (substring target-string 0 (match-beginning 1))) + (setq crm-left-of-element + (substring target-string 0 (match-beginning 1))) ;; the current element (setq crm-current-element (match-string 1 target-string)) ;; string to the right of the current element @@ -287,7 +289,7 @@ The meanings of the return values are: (if completedp (progn - (erase-buffer) + (delete-region (minibuffer-prompt-end) (point-max)) (insert crm-left-of-element completion) ;; (if crm-complete-up-to-point ;; (insert crm-separator)) @@ -480,7 +482,7 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" (setq result (catch 'crm-exit - (if (eq (point-min) (point-max)) + (if (eq (minibuffer-prompt-end) (point-max)) (throw 'crm-exit t)) ;; TODO: this test is suspect? @@ -506,7 +508,8 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" nil (if (equal result "check") (let ((check-strings - (crm-strings-completed-p (buffer-string)))) + (crm-strings-completed-p + (buffer-substring (minibuffer-prompt-end) (point-max))))) ;; check all of minibuffer (if (eq check-strings t) (throw 'exit nil) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index e543932d8b4..45b6e810ca1 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -231,7 +231,9 @@ first will be printed into the backtrace buffer." ;; would need to be de-iconified anyway immediately ;; after when we re-enter the debugger, so iconifying it ;; here would cause flashing. - (bury-buffer)))) + ;; Use quit-window rather than bury-buffer to quieten + ;; Drew Adams. --Stef + (quit-window)))) (kill-buffer debugger-buffer)) (set-match-data debugger-outer-match-data))) ;; Put into effect the modified values of these variables diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index a342f8a5530..6ee87919d38 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -201,10 +201,7 @@ See the command `%s' for a description of this minor-mode.")) :type 'boolean ,@(cond ((not (and curfile require)) nil) - ((not (eq require t)) `(:require ,require)) - (t `(:require - ',(intern (file-name-nondirectory - (file-name-sans-extension curfile)))))) + ((not (eq require t)) `(:require ,require))) ,@(nreverse extra-keywords)))) ;; The actual function. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index ebe375088a3..55fa93775db 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -61,7 +61,7 @@ ;;; Options (defgroup edebug nil - "A source-level debugger for Emacs Lisp" + "A source-level debugger for Emacs Lisp." :group 'lisp) @@ -519,7 +519,7 @@ the minibuffer." (put ',(nth 1 form) 'saved-face ',(get (nth 1 form) 'saved-face)) (put ',(nth 1 form) 'customized-face - ',(nth 2 form))) + ,(nth 2 form))) (put (nth 1 form) 'saved-face nil))))) (setq edebug-result (eval form)) (if (not edebugging) @@ -4224,7 +4224,7 @@ reinstrument it." (- (current-column) (if (= ?\( (following-char)) 0 1))))) (insert (make-string - (max 0 (- col (- (point) start-of-count-line))) ?\ ) + (max 0 (- col (- (point) start-of-count-line))) ?\s) (if (and (< 0 count) (not (memq coverage '(unknown ok-coverage)))) diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 82ce6f404f7..feaeb2898ce 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -130,7 +130,7 @@ ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv (defgroup elp nil - "Emacs Lisp Profiler" + "Emacs Lisp Profiler." :group 'lisp) (defcustom elp-function-list nil diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 972fe6bafc8..1ee4665005a 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -631,10 +631,10 @@ Reinitialize the face according to the `defface' specification." ;; Resetting `saved-face' temporarily to nil is needed to let ;; `defface' change the spec, regardless of a saved spec. (prog1 `(prog1 ,form - (put ',(eval (nth 1 form)) 'saved-face + (put ,(nth 1 form) 'saved-face ',(get (eval (nth 1 form)) 'saved-face)) - (put ',(eval (nth 1 form)) 'customized-face - ',(eval (nth 2 form)))) + (put ,(nth 1 form) 'customized-face + ,(nth 2 form))) (put (eval (nth 1 form)) 'saved-face nil))) ((eq (car form) 'progn) (cons 'progn (mapcar 'eval-defun-1 (cdr form)))) diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index b5a279bbbf4..b3573d0f3b5 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -45,15 +45,17 @@ ;; structure of the result with the input. Doing so recursively using ;; `maybe-cons' results in excessively deep recursion for very long ;; input forms. -(defmacro macroexp-accumulate (#1=#:\(var\ list\) &rest body) +(defmacro macroexp-accumulate (var+list &rest body) "Return a list of the results of evaluating BODY for each element of LIST. Evaluate BODY with VAR bound to each `car' from LIST, in turn. Return a list of the values of the final form in BODY. The list structure of the result will share as much with LIST as possible (for instance, when BODY just returns VAR unchanged, the -result will be eq to LIST)." - (let ((var (car #1#)) - (list (cadr #1#)) +result will be eq to LIST). + +\(fn (VAR LIST) BODY...)" + (let ((var (car var+list)) + (list (cadr var+list)) (shared (make-symbol "shared")) (unshared (make-symbol "unshared")) (tail (make-symbol "tail")) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 93e30fb0f55..d9f3df99bae 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -67,7 +67,7 @@ to make output that `read' can handle, whenever this is possible." (save-excursion (backward-char 1) (skip-chars-backward "'`#^") - (when (and (not (bobp)) (memq (char-before) '(?\ ?\t ?\n))) + (when (and (not (bobp)) (memq (char-before) '(?\s ?\t ?\n))) (delete-region (point) (progn (skip-chars-backward " \t\n") (point))) diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index 6b87d06cb0e..950c9e251be 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -73,7 +73,7 @@ ;;;========================================================================== (defgroup testcover nil - "Code-coverage tester" + "Code-coverage tester." :group 'lisp :prefix "testcover-" :version "21.1") diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 79aad8bd121..d9662f91c7f 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -408,12 +408,11 @@ This function returns a timer object which you can use in `cancel-timer'." (defmacro with-timeout (list &rest body) "Run BODY, but if it doesn't finish in SECONDS seconds, give up. If we give up, we run the TIMEOUT-FORMS and return the value of the last one. -The call should look like: - (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...) The timeout is checked whenever Emacs waits for some kind of external -event \(such as keyboard input, input from subprocesses, or a certain time); +event (such as keyboard input, input from subprocesses, or a certain time); if the program loops without waiting in any way, the timeout will not -be detected." +be detected. +\n(fn (SECONDS TIMEOUT-FORMS...) BODY)" (let ((seconds (car list)) (timeout-forms (cdr list))) `(let ((with-timeout-tag (cons nil nil)) diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index e3d3e9e645e..31ff8b993c3 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el @@ -156,7 +156,7 @@ (require 'advice) (defgroup trace nil - "Tracing facility for Emacs Lisp functions" + "Tracing facility for Emacs Lisp functions." :prefix "trace-" :group 'lisp) |