diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 13:24:35 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 13:24:35 +0000 |
commit | a1506d2977a8c2eb982ad0b59416009cdfaa6f51 (patch) | |
tree | 3cbb868ad6eb3b188d5064389538c490c124d8be /lisp/emacs-lisp | |
parent | f1180544bb5ff44cdb45b8734734294b0a2fa7a4 (diff) | |
download | emacs-a1506d2977a8c2eb982ad0b59416009cdfaa6f51.tar.gz emacs-a1506d2977a8c2eb982ad0b59416009cdfaa6f51.tar.bz2 emacs-a1506d2977a8c2eb982ad0b59416009cdfaa6f51.zip |
Trailing whitepace deleted.
Diffstat (limited to 'lisp/emacs-lisp')
29 files changed, 417 insertions, 417 deletions
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 166c16bf86f..325d3903e89 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -92,7 +92,7 @@ files.") ("Per Abrahamsen" "Per Abhiddenware") ("Peter S. Galbraith" "Peter S Galbraith") ("Richard M. Stallman" "Richard M. Stallman,,," "Richard Stallman" - "rms" "rms@gnu.org") + "rms" "rms@gnu.org") ("Robert J. Chassell" "Bob Chassell") ("Roland B. Roberts" "Roland B Roberts" "Roland Roberts") ("Rui-Tao Dong" "Rui-Tao Dong ~{6-Hpln~}") @@ -110,7 +110,7 @@ files.") "Alist of author aliases. Each entry is of the form (REALNAME REGEXP...). If an author's name -matches one of the REGEXPs, use REALNAME instead. +matches one of the REGEXPs, use REALNAME instead. If REALNAME is nil, ignore that author.") @@ -321,7 +321,7 @@ the file name." (setq authors-checked-files-alist (cons (cons file valid) authors-checked-files-alist)) (unless valid - (setq authors-invalid-file-names + (setq authors-invalid-file-names (cons (format "%s:%d: unrecognized `%s' for %s" log-file (1+ (count-lines (point-min) pos)) @@ -510,7 +510,7 @@ TABLE is a hash table to add author information to." CHANGES is an alist of entries (FILE (ACTION . COUNT) ...), as produced by `authors-scan-change-log'. The element added to `authors-author-list' is (AUTHOR WROTE CHANGED), where -WROTE and CHANGED are lists of the files written and changed by AUTHOR." +WROTE and CHANGED are lists of the files written and changed by AUTHOR." (when author (let ((nchanged 0) wrote-list @@ -549,7 +549,7 @@ WROTE and CHANGED are lists of the files written and changed by AUTHOR." (defun authors (root) "Extract author information from change logs and Lisp source files. ROOT is the root directory under which to find the files. If called -interactively, ROOT is read from the minibuffer. +interactively, ROOT is read from the minibuffer. Result is a buffer *Authors* containing authorship information, and a buffer *Authors Errors* containing references to unknown files." (interactive "DEmacs source directory: ") @@ -575,14 +575,14 @@ buffer *Authors Errors* containing references to unknown files." (set-buffer (get-buffer-create buffer-name)) (erase-buffer) (set-buffer-file-coding-system authors-coding-system) - (insert + (insert "Many people have contributed code included in the Free Software Foundation's distribution of GNU Emacs. To show our appreciation for their public spirit, we list here in alphabetical order a condensed list of their contributions.\n") (let (authors-author-list a) (maphash #'authors-add-to-author-list table) - (setq authors-author-list + (setq authors-author-list (sort authors-author-list (lambda (a b) (string-lessp (car a) (car b))))) (dolist (a authors-author-list) @@ -607,7 +607,7 @@ list of their contributions.\n") (insert "\n ")) (insert " " file)) (insert "\n"))))) - (insert "\nLocal" " Variables:\ncoding: " + (insert "\nLocal" " Variables:\ncoding: " (symbol-name authors-coding-system) "\nEnd:\n") (message "Generating buffer %s... done" buffer-name) (unless noninteractive diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index e37acb1b305..21af0d866ea 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -318,7 +318,7 @@ are used." (setq autoload form)) (let ((autoload-print-form-outbuf outbuf)) (autoload-print-form autoload))) - + ;; Copy the rest of the line to the output. (princ (buffer-substring (progn diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index f4db8bf1350..eafa63d6e32 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el @@ -142,7 +142,7 @@ Vectors work just like lists. Nested backquotes are permitted." ;; Scan this list-level, setting LISTS to a list of forms, ;; each of which produces a list of elements ;; that should go in this level. - ;; The order of LISTS is backwards. + ;; The order of LISTS is backwards. ;; If there are non-splicing elements (constant or variable) ;; at the beginning, put them in FIRSTLIST, ;; as a list of tagged values (TAG . FORM). @@ -172,7 +172,7 @@ Vectors work just like lists. Nested backquotes are permitted." (if (or rest list) (setq lists (cons (backquote-listify list (backquote-process rest)) lists))) - ;; Turn LISTS into a form that produces the combined list. + ;; Turn LISTS into a form that produces the combined list. (setq expression (if (or (cdr lists) (eq (car-safe (car lists)) backquote-splice-symbol)) diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 46040da8d92..312d4b386b3 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -33,22 +33,22 @@ ;; and encoding binary data formats like these is made simple using a ;; structure specification which closely resembles the C style ;; structure declarations. -;; +;; ;; Encoded (binary) data is stored in a unibyte string or vector, -;; while the decoded data is stored in an alist with (FIELD . VALUE) +;; while the decoded data is stored in an alist with (FIELD . VALUE) ;; pairs. ;; Example: - + ;; Consider the following C structures: -;; +;; ;; struct header { ;; unsigned long dest_ip; ;; unsigned long src_ip; ;; unsigned short dest_port; ;; unsigned short src_port; ;; }; -;; +;; ;; struct data { ;; unsigned char type; ;; unsigned char opcode; @@ -56,22 +56,22 @@ ;; unsigned char id[8]; /* nul-terminated string */ ;; unsigned char data[/* (length + 3) & ~3 */]; ;; }; -;; +;; ;; struct packet { ;; struct header header; ;; unsigned char items; ;; unsigned char filler[3]; ;; struct data item[/* items */]; ;; }; -;; +;; ;; The corresponding Lisp bindat specification looks like this: -;; +;; ;; (setq header-spec ;; '((dest-ip ip) ;; (src-ip ip) ;; (dest-port u16) ;; (src-port u16))) -;; +;; ;; (setq data-spec ;; '((type u8) ;; (opcode u8) @@ -79,20 +79,20 @@ ;; (id strz 8) ;; (data vec (length)) ;; (align 4))) -;; +;; ;; (setq packet-spec ;; '((header struct header-spec) ;; (items u8) ;; (fill 3) ;; (item repeat (items) ;; ((struct data-spec))))) -;; +;; ;; ;; A binary data representation may look like -;; [ 192 168 1 100 192 168 1 101 01 28 21 32 2 0 0 0 +;; [ 192 168 1 100 192 168 1 101 01 28 21 32 2 0 0 0 ;; 2 3 5 0 ?A ?B ?C ?D ?E ?F 0 0 1 2 3 4 5 0 0 0 ;; 1 4 7 0 ?B ?C ?D ?E ?F ?G 0 0 6 7 8 9 10 11 12 0 ] -;; +;; ;; The corresponding decoded structure looks like ;; ;; ((header @@ -176,7 +176,7 @@ ;; A `union' specification ;; ([FIELD] union TAG_VAL (TAG SPEC) ... [(t SPEC)]) -;; is interpreted by evalling TAG_VAL and then comparing that to +;; is interpreted by evalling TAG_VAL and then comparing that to ;; each TAG using equal; if a match is found, the corresponding SPEC ;; is used. ;; If TAG is a form (eval EXPR), EXPR is evalled with `tag' bound to the @@ -204,7 +204,7 @@ (string-to-char (substring raw-data pos (1+ pos))) (aref raw-data pos)) (setq pos (1+ pos)))) - + (defun bindat--unpack-u16 () (let* ((a (bindat--unpack-u8)) (b (bindat--unpack-u8))) (logior (lsh a 8) b))) @@ -341,7 +341,7 @@ (setq struct (cons (cons field data) struct)) (setq struct (append data struct)))))) struct)) - + (defun bindat-unpack (spec raw-data &optional pos) "Return structured data according to SPEC for binary data in RAW-DATA. RAW-DATA is a string or vector. Optional third arg POS specifies the @@ -365,7 +365,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." struct) -;; Calculate raw-data length of structured data +;; Calculate raw-data length of structured data (defvar bindat--fixed-length-alist '((u8 . 1) (byte . 1) @@ -398,7 +398,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq len (apply 'bindat-get-field struct len))) (if (not len) (setq len 1)) - (cond + (cond ((eq type 'eval) (if field (setq struct (cons (cons field (eval len)) struct)) @@ -446,7 +446,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (defun bindat--pack-u8 (v) (aset raw-data pos (logand v 255)) (setq pos (1+ pos))) - + (defun bindat--pack-u16 (v) (aset raw-data pos (logand (lsh v -8) 255)) (aset raw-data (1+ pos) (logand v 255)) @@ -513,7 +513,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (aset raw-data (+ pos i) (aref v i)) (setq i (1+ i))) (setq pos (+ pos len)))) - (t + (t (setq pos (+ pos len))))) (defun bindat--pack-group (struct spec) @@ -540,7 +540,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq len (apply 'bindat-get-field struct len))) (if (not len) (setq len 1)) - (cond + (cond ((eq type 'eval) (if field (setq struct (cons (cons field (eval len)) struct)) @@ -601,7 +601,7 @@ only that many elements from VECT." (setq i (1- i) s (cons (format (if (= i 0) fmt fmt2) (aref vect i)) s))) (apply 'concat s))) - + (defun bindat-vector-to-dec (vect &optional sep) "Format vector VECT in decimal format separated by dots. If optional second arg SEP is a string, use that as separator." diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 7ccd2698b2c..0bf5a7904c2 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -31,7 +31,7 @@ ;; You can, however, make a faster pig." ;; ;; Or, to put it another way, the emacs byte compiler is a VW Bug. This code -;; makes it be a VW Bug with fuel injection and a turbocharger... You're +;; makes it be a VW Bug with fuel injection and a turbocharger... You're ;; still not going to make it go faster than 70 mph, but it might be easier ;; to get it there. ;; @@ -62,17 +62,17 @@ ;; Simple defsubsts often produce forms like ;; (let ((v1 (f1)) (v2 (f2)) ...) ;; (FN v1 v2 ...)) -;; It would be nice if we could optimize this to +;; It would be nice if we could optimize this to ;; (FN (f1) (f2) ...) ;; but we can't unless FN is dynamically-safe (it might be dynamically ;; referring to the bindings that the lambda arglist established.) ;; One of the uncountable lossages introduced by dynamic scope... ;; -;; Maybe there should be a control-structure that says "turn on +;; Maybe there should be a control-structure that says "turn on ;; fast-and-loose type-assumptive optimizations here." Then when ;; we see a form like (car foo) we can from then on assume that ;; the variable foo is of type cons, and optimize based on that. -;; But, this won't win much because of (you guessed it) dynamic +;; But, this won't win much because of (you guessed it) dynamic ;; scope. Anything down the stack could change the value. ;; (Another reason it doesn't work is that it is perfectly valid ;; to call car with a null argument.) A better approach might @@ -107,7 +107,7 @@ ;; ;; However, if there was even a single let-binding around the COND, ;; it could not be byte-compiled, because there would be an "unbind" -;; byte-op between the final "call" and "return." Adding a +;; byte-op between the final "call" and "return." Adding a ;; Bunbind_all byteop would fix this. ;; ;; (defun foo (x y z) ... (foo a b c)) @@ -129,8 +129,8 @@ ;; ;; Wouldn't it be nice if Emacs Lisp had lexical scope. ;; -;; Idea: the form (lexical-scope) in a file means that the file may be -;; compiled lexically. This proclamation is file-local. Then, within +;; Idea: the form (lexical-scope) in a file means that the file may be +;; compiled lexically. This proclamation is file-local. Then, within ;; that file, "let" would establish lexical bindings, and "let-dynamic" ;; would do things the old way. (Or we could use CL "declare" forms.) ;; We'd have to notice defvars and defconsts, since those variables should @@ -140,10 +140,10 @@ ;; 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. ;; -;; A major disadvantage of this scheme is that the interpreter and compiler -;; would have different semantics for files compiled with (dynamic-scope). +;; A major disadvantage of this scheme is that the interpreter and compiler +;; would have different semantics for files compiled with (dynamic-scope). ;; Since this would be a file-local optimization, there would be no way to -;; modify the interpreter to obey this (unless the loader was hacked +;; modify the interpreter to obey this (unless the loader was hacked ;; in some grody way, but that's a really bad idea.) ;; Other things to consider: @@ -157,7 +157,7 @@ ;;;;; error free also they may act as true-constants. ;;;(disassemble (lambda (x) (and (point) (foo)))) -;;;;; When +;;;;; When ;;;;; - all but one arguments to a function are constant ;;;;; - the non-constant argument is an if-expression (cond-expression?) ;;;;; then the outer function can be distributed. If the guarding @@ -285,7 +285,7 @@ form)))))) ;;; ((lambda ...) ...) -;;; +;;; (defun byte-compile-unfold-lambda (form &optional name) (or name (setq name "anonymous lambda")) (let ((lambda (car form)) @@ -338,13 +338,13 @@ (byte-compile-warn "attempt to open-code `%s' with too many arguments" name)) form) - + ;; The following leads to infinite recursion when loading a ;; file containing `(defsubst f () (f))', and then trying to ;; byte-compile that file. ;(setq body (mapcar 'byte-optimize-form body))) - - (let ((newform + + (let ((newform (if bindings (cons 'let (cons (nreverse bindings) body)) (cons 'progn body)))) @@ -427,21 +427,21 @@ (cons (byte-optimize-form (nth 1 form) t) (cons (byte-optimize-form (nth 2 form) for-effect) (byte-optimize-body (cdr (cdr (cdr form))) t))))) - + ((memq fn '(save-excursion save-restriction save-current-buffer)) ;; those subrs which have an implicit progn; it's not quite good ;; enough to treat these like normal function calls. ;; This can turn (save-excursion ...) into (save-excursion) which ;; will be optimized away in the lap-optimize pass. (cons fn (byte-optimize-body (cdr form) for-effect))) - + ((eq fn 'with-output-to-temp-buffer) ;; this is just like the above, except for the first argument. (cons fn (cons (byte-optimize-form (nth 1 form) nil) (byte-optimize-body (cdr (cdr form)) for-effect)))) - + ((eq fn 'if) (when (< (length form) 3) (byte-compile-warn "too few arguments for `if'")) @@ -450,7 +450,7 @@ (cons (byte-optimize-form (nth 2 form) for-effect) (byte-optimize-body (nthcdr 3 form) for-effect))))) - + ((memq fn '(and or)) ; remember, and/or are control structures. ;; take forms off the back until we can't any more. ;; In the future it could conceivably be a problem that the @@ -474,7 +474,7 @@ (byte-compile-warn "misplaced interactive spec: `%s'" (prin1-to-string form)) nil) - + ((memq fn '(defun defmacro function condition-case save-window-excursion)) ;; These forms are compiled as constants or by breaking out @@ -490,7 +490,7 @@ (cons fn (cons (byte-optimize-form (nth 1 form) for-effect) (cdr (cdr form))))) - + ((eq fn 'catch) ;; the body of a catch is compiled (and thus optimized) as a ;; top-level form, so don't do it here. The tag is never @@ -523,7 +523,7 @@ (not (eq form (setq form (compiler-macroexpand form))))) (byte-optimize-form form for-effect)) - + ((not (symbolp fn)) (byte-compile-warn "`%s' is a malformed function" (prin1-to-string fn)) @@ -552,7 +552,7 @@ ;; appending a nil here might not be necessary, but it can't hurt. (byte-optimize-form (cons 'progn (append (cdr form) '(nil))) t)) - + (t ;; Otherwise, no args can be considered to be for-effect, ;; even if the called function is for-effect, because we @@ -622,7 +622,7 @@ ((keywordp ,form)))) ;; If the function is being called with constant numeric args, -;; evaluate as much as possible at compile-time. This optimizer +;; evaluate as much as possible at compile-time. This optimizer ;; assumes that the function is associative, like + or *. (defun byte-optimize-associative-math (form) (let ((args nil) @@ -816,7 +816,7 @@ (cons (/ (nth 1 form) last) (byte-compile-butlast (cdr (cdr form))))) last nil)))) - (cond + (cond ;;; ((null (cdr (cdr form))) ;;; (nth 1 form)) ((eq (nth 1 form) 0) @@ -912,7 +912,7 @@ (put 'cdr-safe 'byte-optimizer 'byte-optimize-predicate) -;; I'm not convinced that this is necessary. Doesn't the optimizer loop +;; I'm not convinced that this is necessary. Doesn't the optimizer loop ;; take care of this? - Jamie ;; I think this may some times be necessary to reduce ie (quote 5) to 5, ;; so arithmetic optimizers recognize the numeric constant. - Hallvard @@ -1169,7 +1169,7 @@ nil form)) -;;; enumerating those functions which need not be called if the returned +;;; enumerating those functions which need not be called if the returned ;;; value is not used. That is, something like ;;; (progn (list (something-with-side-effects) (yow)) ;;; (foo)) @@ -1233,7 +1233,7 @@ zerop)) (side-effect-and-error-free-fns '(arrayp atom - bobp bolp bool-vector-p + bobp bolp bool-vector-p buffer-end buffer-list buffer-size buffer-string bufferp car-safe case-table-p cdr-safe char-or-string-p commandp cons consp current-buffer current-global-map current-indentation @@ -1440,7 +1440,7 @@ byte-current-buffer byte-interactive-p)) (defconst byte-compile-side-effect-free-ops - (nconc + (nconc '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1 byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate @@ -1472,7 +1472,7 @@ ;;; varbind pop-up-windows ;;; not ;;; -;;; we break the program, because it will appear that pop-up-windows and +;;; we break the program, because it will appear that pop-up-windows and ;;; old-pop-ups are not EQ when really they are. So we have to know what ;;; the BOOL variables are, and not perform this optimization on them. @@ -1619,7 +1619,7 @@ ;; goto-X-if-non-nil goto-Y X: --> goto-Y-if-nil X: ;; ;; it is wrong to do the same thing for the -else-pop variants. - ;; + ;; ((and (or (eq 'byte-goto-if-nil (car lap0)) (eq 'byte-goto-if-not-nil (car lap0))) ; gotoX (eq 'byte-goto (car lap1)) ; gotoY @@ -1722,7 +1722,7 @@ str (concat str " %s") i (1+ i)))) (if opt-p - (let ((tagstr + (let ((tagstr (if (eq 'TAG (car (car tmp))) (format "%d:" (car (cdr (car tmp)))) (or (car tmp) "")))) @@ -1903,7 +1903,7 @@ (byte-goto-if-not-nil-else-pop . byte-goto-if-nil-else-pop)))) newtag) - + (nth 1 newtag) ) (setcdr tmp (cons (setcdr lap0 newtag) (cdr tmp))) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 8269d9dec9e..7cd808ebbe7 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -426,7 +426,7 @@ be re-created.") ;; end of a word in a conglomerate. (modify-syntax-entry ?- "w" checkdoc-syntax-table) ) - + ;;; Compatibility ;; @@ -940,7 +940,7 @@ Optional argument TAKE-NOTES causes all errors to be logged." (checkdoc-show-diagnostics))) (goto-char p)) (if (interactive-p) (message "Checking interactive message text...done."))) - + ;;;###autoload (defun checkdoc-eval-defun () "Evaluate the current form with `eval-defun' and check its documentation. @@ -2340,7 +2340,7 @@ The default boundary is the entire buffer." (while (setq type (checkdoc-message-text-next-string end)) (setq e (checkdoc-message-text-engine type))) e)) - + (defun checkdoc-message-text-next-string (end) "Move cursor to the next checkable message string after point. Return the message classification. diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 3bdb3382bc1..4edc3d0c6e5 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -132,7 +132,7 @@ If nil, indent backquoted lists as data, i.e., like quoted lists." (+ loop-indentation lisp-loop-keyword-indentation)) (t (+ loop-indentation lisp-loop-forms-indentation))))) - + ;;;###autoload (defun common-lisp-indent-function (indent-point state) @@ -140,8 +140,8 @@ If nil, indent backquoted lists as data, i.e., like quoted lists." (looking-at "([Ll][Oo][Oo][Pp]")) (common-lisp-loop-part-indentation indent-point state) (common-lisp-indent-function-1 indent-point state))) - - + + (defun common-lisp-indent-function-1 (indent-point state) (let ((normal-indent (current-column))) ;; Walk up list levels until we see something diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 63be5bcb612..e8c8acbe84c 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1368,7 +1368,7 @@ lexical closures as in Common Lisp." (set (car cl-closure-vars) [bad-lexical-ref]) (list (car x) (cadr x) (car cl-closure-vars)))) bindings)) - (ebody + (ebody (cl-macroexpand-all (cons 'progn body) (nconc (mapcar (function (lambda (x) diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el index d22127c3dee..21353755ed6 100644 --- a/lisp/emacs-lisp/cl-specs.el +++ b/lisp/emacs-lisp/cl-specs.el @@ -7,7 +7,7 @@ ;; LCD Archive Entry: ;; cl-specs.el|Daniel LaLiberte|liberte@holonexus.org ;; |Edebug specs for cl.el -;; |$Date: 2001/07/16 12:22:59 $|1.1| +;; |$Date: 2002/10/01 17:00:27 $|1.1| ;; This file is part of GNU Emacs. @@ -53,22 +53,22 @@ (def-edebug-spec ecase case) (def-edebug-spec do ((&rest &or symbolp (symbolp &optional form form)) - (form body) + (form body) cl-declarations body)) (def-edebug-spec do* do) -(def-edebug-spec dolist +(def-edebug-spec dolist ((symbolp form &optional form) cl-declarations body)) (def-edebug-spec dotimes dolist) (def-edebug-spec do-symbols ((symbolp &optional form form) cl-declarations body)) -(def-edebug-spec do-all-symbols +(def-edebug-spec do-all-symbols ((symbolp &optional form) cl-declarations body)) ;; Multiple values (def-edebug-spec multiple-value-list (form)) (def-edebug-spec multiple-value-call (function-form body)) -(def-edebug-spec multiple-value-bind +(def-edebug-spec multiple-value-bind ((&rest symbolp) form cl-declarations body)) (def-edebug-spec multiple-value-setq ((&rest symbolp) form)) (def-edebug-spec multiple-value-prog1 (form body)) @@ -84,11 +84,11 @@ (def-edebug-spec flet ((&rest (defun*)) cl-declarations body)) (def-edebug-spec labels flet) -(def-edebug-spec macrolet - ((&rest (&define name (&rest arg) cl-declarations-or-string def-body)) +(def-edebug-spec macrolet + ((&rest (&define name (&rest arg) cl-declarations-or-string def-body)) cl-declarations body)) -(def-edebug-spec symbol-macrolet +(def-edebug-spec symbol-macrolet ((&rest (symbol sexp)) cl-declarations body)) (def-edebug-spec destructuring-bind @@ -105,13 +105,13 @@ (def-edebug-spec letf* letf) -(def-edebug-spec defsetf - (&define name +(def-edebug-spec defsetf + (&define name [&or [symbolp &optional stringp] [cl-lambda-list (symbolp)]] cl-declarations-or-string def-body)) -(def-edebug-spec define-setf-method +(def-edebug-spec define-setf-method (&define name cl-lambda-list cl-declarations-or-string def-body)) (def-edebug-spec define-modify-macro @@ -128,8 +128,8 @@ (def-edebug-spec incf (place &optional form)) (def-edebug-spec decf incf) (def-edebug-spec push (form place)) ; different for CL -(def-edebug-spec pushnew - (form place &rest +(def-edebug-spec pushnew + (form place &rest &or [[&or ":test" ":test-not" ":key"] function-form] [edebug-keywordp form])) (def-edebug-spec pop (place)) ; different for CL @@ -180,7 +180,7 @@ ;; Declarations -(def-edebug-spec cl-decl-spec +(def-edebug-spec cl-decl-spec ((symbolp &rest sexp))) (def-edebug-spec cl-declarations @@ -214,17 +214,17 @@ (&or ([&or (symbolp arg) arg] &optional def-form arg) arg)) ;; The lambda list for macros is different from that of normal lambdas. -;; Note that &environment is only allowed as first or last items in the +;; Note that &environment is only allowed as first or last items in the ;; top level list. (def-edebug-spec cl-macro-list (([&optional "&environment" arg] [&rest cl-macro-arg] - [&optional ["&optional" &rest + [&optional ["&optional" &rest &or (cl-macro-arg &optional def-form cl-macro-arg) arg]] [&optional [[&or "&rest" "&body"] cl-macro-arg]] - [&optional ["&key" [&rest - [&or ([&or (symbolp cl-macro-arg) arg] + [&optional ["&key" [&rest + [&or ([&or (symbolp cl-macro-arg) arg] &optional def-form cl-macro-arg) arg]] &optional "&allow-other-keys"]] @@ -239,11 +239,11 @@ (def-edebug-spec cl-macro-list1 (([&optional "&whole" arg] ;; only allowed at lower levels [&rest cl-macro-arg] - [&optional ["&optional" &rest + [&optional ["&optional" &rest &or (cl-macro-arg &optional def-form cl-macro-arg) arg]] [&optional [[&or "&rest" "&body"] cl-macro-arg]] - [&optional ["&key" [&rest - [&or ([&or (symbolp cl-macro-arg) arg] + [&optional ["&key" [&rest + [&or ([&or (symbolp cl-macro-arg) arg] &optional def-form cl-macro-arg) arg]] &optional "&allow-other-keys"]] @@ -262,7 +262,7 @@ def-body)) (def-edebug-spec defsubst* defun*) -(def-edebug-spec defmacro* +(def-edebug-spec defmacro* (&define name cl-macro-list cl-declarations-or-string def-body)) (def-edebug-spec define-compiler-macro defmacro*) @@ -280,7 +280,7 @@ (def-edebug-spec function-form ;; form at the end could also handle "function", ;; but recognize it specially to avoid wrapping function forms. - (&or ([&or "quote" "function"] &or symbolp lambda-expr) + (&or ([&or "quote" "function"] &or symbolp lambda-expr) ("function*" function*) form)) @@ -293,7 +293,7 @@ (&define ; makes top-level form not be wrapped [&or symbolp (gate - symbolp &rest + symbolp &rest (&or [":conc-name" &or stringp "nil"] [":constructor" symbolp &optional cl-lambda-list] [":copier" symbolp] @@ -329,7 +329,7 @@ (def-edebug-spec loop ([&optional ["named" symbolp]] - [&rest + [&rest &or ["repeat" form] loop-for-as @@ -351,36 +351,36 @@ &rest ["and" loop-for-as-subclause])) (def-edebug-spec loop-for-as-subclause - (loop-var + (loop-var loop-type-spec - &or + &or [[&or "in" "on" "in-ref" "across-ref"] form &optional ["by" function-form]] ["=" form &optional ["then" form]] ["across" form] - ["being" + ["being" [&or "the" "each"] - &or - [[&or "element" "elements"] + &or + [[&or "element" "elements"] [&or "of" "in" "of-ref"] form &optional "using" ["index" symbolp]];; is this right? [[&or "hash-key" "hash-keys" "hash-value" "hash-values"] [&or "of" "in"] - hash-table-p &optional ["using" ([&or "hash-value" "hash-values" + hash-table-p &optional ["using" ([&or "hash-value" "hash-values" "hash-key" "hash-keys"] sexp)]] - + [[&or "symbol" "present-symbol" "external-symbol" "symbols" "present-symbols" "external-symbols"] [&or "in" "of"] package-p] - + ;; Extensions for Emacs Lisp, including Lucid Emacs. [[&or "frame" "frames" "screen" "screens" "buffer" "buffers"]] - [[&or "window" "windows"] + [[&or "window" "windows"] [&or "of" "in"] form] [[&or "overlay" "overlays" @@ -388,23 +388,23 @@ [&or "of" "in"] form &optional [[&or "from" "to"] form]] - [[&or "interval" "intervals"] + [[&or "interval" "intervals"] [&or "in" "of"] form &optional [[&or "from" "to"] form] ["property" form]] - + [[&or "key-code" "key-codes" "key-seq" "key-seqs" - "key-binding" "key-bindings"] + "key-binding" "key-bindings"] [&or "in" "of"] form &optional ["using" ([&or "key-code" "key-codes" "key-seq" "key-seqs" - "key-binding" "key-bindings"] + "key-binding" "key-bindings"] sexp)]] ;; For arbitrary extensions, recognize anything else. [symbolp &rest &or symbolp form] ] - + ;; arithmetic - must be last since all parts are optional. [[&optional [[&or "from" "downfrom" "upfrom"] form]] [&optional [[&or "to" "downto" "upto" "below" "above"] form]] @@ -412,10 +412,10 @@ ])) (def-edebug-spec loop-initial-final - (&or ["initially" + (&or ["initially" ;; [&optional &or "do" "doing"] ;; CLtL2 doesn't allow this. &rest loop-non-atomic-expr] - ["finally" &or + ["finally" &or [[&optional &or "do" "doing"] &rest loop-non-atomic-expr] ["return" form]])) @@ -425,11 +425,11 @@ (def-edebug-spec loop-clause (&or [[&or "while" "until" "always" "never" "thereis"] form] - + [[&or "collect" "collecting" "append" "appending" "nconc" "nconcing" - "concat" "vconcat"] form + "concat" "vconcat"] form [&optional ["into" loop-var]]] [[&or "count" "counting" @@ -455,7 +455,7 @@ (def-edebug-spec loop-var ;; The symbolp must be last alternative to recognize e.g. (a b . c) - ;; loop-var => + ;; loop-var => ;; (loop-var . [&or nil loop-var]) ;; (symbolp . [&or nil loop-var]) ;; (symbolp . loop-var) diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 26a34204008..46293bf94f3 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -85,7 +85,7 @@ ;; -tip: use M-f and M-b for ease of navigation among elements. ;;; History: -;; +;; ;; 2000-04-10: ;; ;; first revamped version @@ -211,7 +211,7 @@ and return t." ;; no candidate found nil (progn - ;; + ;; (setq crm-beginning-of-element (match-beginning 1)) (setq crm-end-of-element end-index) ;; string to the left of the current element @@ -226,7 +226,7 @@ and return t." "Return t if CANDIDATE is an exact match for a valid completion." (let ((completions ;; TODO: verify whether the arguments are appropriate - (all-completions + (all-completions candidate crm-completion-table minibuffer-completion-predicate))) (if (member candidate completions) t @@ -271,20 +271,20 @@ The meanings of the return values are: minibuffer-completion-predicate)) (setq last crm-last-exact-completion) (setq crm-last-exact-completion nil) - + (catch 'crm-exit - + (if (null completion) ; no possible completion (progn (crm-temp-echo-area-glyphs " [No match]") (throw 'crm-exit 0))) - + (if (eq completion t) ; was already an exact and unique completion (throw 'crm-exit 1)) - + (setq completedp (null (string-equal completion crm-current-element))) - + (if completedp (progn (erase-buffer) @@ -295,7 +295,7 @@ The meanings of the return values are: (backward-char (length crm-right-of-element)) ;; TODO: is this correct? (setq crm-current-element completion))) - + (if (null (crm-test-completion crm-current-element)) (progn (if completedp ; some completion happened @@ -306,13 +306,13 @@ The meanings of the return values are: (throw 'crm-exit 6)) (if completedp (throw 'crm-exit 4))) - + (setq crm-last-exact-completion completion) (if (not (null last)) (progn (if (not (null (equal crm-current-element last))) (crm-minibuffer-completion-help)))) - + ;; returning -- was already an exact completion (throw 'crm-exit 3))))) @@ -472,24 +472,24 @@ to the location of mismatch and do not exit. This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" (interactive) - + (if (not (crm-find-current-element)) nil (let (result) - + (setq result (catch 'crm-exit - + (if (eq (point-min) (point-max)) (throw 'crm-exit t)) - + ;; TODO: this test is suspect? (if (not (null (crm-test-completion crm-current-element))) (throw 'crm-exit "check")) - + ;; TODO: determine how to detect errors (let ((result (crm-do-completion))) - + (cond ((or (eq 1 result) (eq 3 result)) @@ -501,7 +501,7 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" nil) (throw 'crm-exit "check"))) (nil))))) - + (if (null result) nil (if (equal result "check") @@ -541,7 +541,7 @@ and TAB to `crm-minibuffer-complete'." (define-key crm-local-completion-map (kbd "TAB") (function crm-minibuffer-complete))) - + (unless crm-local-must-match-map (setq crm-local-must-match-map (make-sparse-keymap)) (set-keymap-parent crm-local-must-match-map diff --git a/lisp/emacs-lisp/cust-print.el b/lisp/emacs-lisp/cust-print.el index 435465f427b..a8cf6acd177 100644 --- a/lisp/emacs-lisp/cust-print.el +++ b/lisp/emacs-lisp/cust-print.el @@ -34,7 +34,7 @@ ;; print-length since the standard routines are being replaced. Also, ;; to print custom types constructed from lists and vectors, use ;; custom-print-list and custom-print-vector. See the documentation -;; strings of these variables for more details. +;; strings of these variables for more details. ;; If the results of your expressions contain circular references to ;; other parts of the same structure, the standard Emacs print @@ -131,7 +131,7 @@ ;;This is defined by emacs.") (defcustom print-level nil - "*Controls how many levels deep a nested data object will print. + "*Controls how many levels deep a nested data object will print. If nil, printing proceeds recursively and may lead to max-lisp-eval-depth being exceeded or an error may occur: @@ -147,7 +147,7 @@ level 1." (defcustom print-circle nil - "*Controls the printing of recursive structures. + "*Controls the printing of recursive structures. If nil, printing proceeds recursively and may lead to `max-lisp-eval-depth' being exceeded or an error may occur: @@ -196,7 +196,7 @@ Don't modify this variable directly. Use `add-custom-printer' and (defun add-custom-printer (pred printer) "Add a pair of PREDICATE and PRINTER to `custom-printers'. Any pair that has the same PREDICATE is first removed." - (setq custom-printers (cons (cons pred printer) + (setq custom-printers (cons (cons pred printer) (delq (assq pred custom-printers) custom-printers))) ;; Rather than updating here, we could wait until cust-print-top-level is called. @@ -220,9 +220,9 @@ Any pair that has the same PREDICATE is first removed." ;; (byte-compile `(lambda (object) (cond - ,@(mapcar (function + ,@(mapcar (function (lambda (pair) - `((,(car pair) object) + `((,(car pair) object) (,(cdr pair) object)))) custom-printers) ;; Otherwise return nil. @@ -236,7 +236,7 @@ Any pair that has the same PREDICATE is first removed." ;;==================================================== (defun cust-print-set-function-cell (symbol-pair) - (defalias (car symbol-pair) + (defalias (car symbol-pair) (symbol-function (car (cdr symbol-pair))))) (defun cust-print-original-princ (object &optional stream)) ; dummy def @@ -268,7 +268,7 @@ by running `custom-print-uninstall'." (error custom-error) )) t) - + (defun custom-print-uninstall () "Reset print functions to their emacs subroutines." (interactive) @@ -335,7 +335,7 @@ second argument NOESCAPE is non-nil. This is the custom-print replacement for the standard `prin1-to-string'." (let ((buf (get-buffer-create " *custom-print-temp*"))) - ;; We must erase the buffer before printing in case an error + ;; We must erase the buffer before printing in case an error ;; occurred during the last prin1-to-string and we are in debugger. (save-excursion (set-buffer buf) @@ -364,7 +364,7 @@ This is the custom-print replacement for the standard `print'." (defun custom-format (fmt &rest args) - "Format a string out of a control-string and arguments. + "Format a string out of a control-string and arguments. The first argument is a control string. It, and subsequent arguments substituted into it, become the value, which is a string. It may contain %s or %d or %c to substitute successive following arguments. @@ -385,8 +385,8 @@ characters." (custom-prin1-to-string arg) arg))) args))) - - + + (defun custom-message (fmt &rest args) "Print a one-line message at the bottom of the screen. The first argument is a control string. @@ -401,7 +401,7 @@ See `custom-format' for the details." ;; It doesn't work to princ the result of custom-format as in: ;; (cust-print-original-princ (apply 'custom-format fmt args)) ;; because the echo area requires special handling - ;; to avoid duplicating the output. + ;; to avoid duplicating the output. ;; cust-print-original-message does it right. (apply 'cust-print-original-message fmt (mapcar (function (lambda (arg) @@ -409,7 +409,7 @@ See `custom-format' for the details." (custom-prin1-to-string arg) arg))) args))) - + (defun custom-error (fmt &rest args) "Signal an error, making error message by passing all args to `format'. @@ -435,12 +435,12 @@ See `custom-format' for the details." ;; Set up for printing. (let ((standard-output (or stream standard-output)) ;; circle-table will be non-nil if anything is circular. - (circle-table (and print-circle + (circle-table (and print-circle (cust-print-preprocess-circle-tree object))) (cust-print-current-level (or print-level -1))) (defalias 'cust-print-original-printer emacs-printer) - (defalias 'cust-print-low-level-prin + (defalias 'cust-print-low-level-prin (cond ((or custom-printers circle-table @@ -451,7 +451,7 @@ See `custom-format' for the details." (or print-level print-length))) 'cust-print-print-object) (t 'cust-print-original-printer))) - (defalias 'cust-print-prin + (defalias 'cust-print-prin (if circle-table 'cust-print-print-circular 'cust-print-low-level-prin)) (cust-print-prin object) @@ -461,7 +461,7 @@ See `custom-format' for the details." (defun cust-print-print-object (object) ;; Test object type and print accordingly. ;; Could be called as either cust-print-low-level-prin or cust-print-prin. - (cond + (cond ((null object) (cust-print-original-printer object)) ((cust-print-use-custom-printer object) object) ((consp object) (cust-print-list object)) @@ -561,7 +561,7 @@ See `custom-format' for the details." ;;================================== (defun cust-print-preprocess-circle-tree (object) - ;; Fill up the table. + ;; Fill up the table. (let (;; Table of tags for each object in an object to be printed. ;; A tag is of the form: ;; ( <object> <nil-t-or-id-number> ) @@ -600,8 +600,8 @@ See `custom-format' for the details." (defun cust-print-walk-circle-tree (object) (let (read-equivalent-p tag) (while object - (setq read-equivalent-p - (or (numberp object) + (setq read-equivalent-p + (or (numberp object) (and (symbolp object) ;; Check if it is uninterned. (eq object (intern-soft (symbol-name object))))) @@ -617,7 +617,7 @@ See `custom-format' for the details." (cons (list object) (cdr circle-table))))) (setq object - (cond + (cond (tag ;; No need to descend since we have already. nil) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index f4cdfd5a057..43e4d781a77 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -338,7 +338,7 @@ That buffer should be current already." ;; Make the unchanged part of the backtrace inaccessible ;; so it won't be scanned. (narrow-to-region (point-min) new-end))) - + ;; Scan the new part of the backtrace, inserting xrefs. (goto-char (point-min)) (while (progn diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el index bf9e9d04ccc..47a5a0c3428 100644 --- a/lisp/emacs-lisp/disass.el +++ b/lisp/emacs-lisp/disass.el @@ -88,7 +88,7 @@ redefine OBJECT if it is a symbol." (setq macro t obj (cdr obj))) (if (and (listp obj) (eq (car obj) 'byte-code)) - (setq obj (list 'lambda nil obj))) + (setq obj (list 'lambda nil obj))) (if (and (listp obj) (not (eq (car obj) 'lambda))) (error "not a function")) (if (consp obj) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index a0c2ff11522..c0b77fcf428 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -228,7 +228,7 @@ With zero or negative ARG turn mode off. ,(if keymap keymap-sym `(if (boundp ',keymap-sym) (symbol-value ',keymap-sym)))) - + ;; If the mode is global, call the function according to the default. ,(if globalp `(if (and load-file-name (not (equal ,init-value ,mode))) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index b4f9c751d90..77c4244d8fe 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -39,7 +39,7 @@ ;; First evaluate a defun with C-M-x, then run the function. Step ;; through the code with SPC, mark breakpoints with b, go until a ;; breakpoint is reached with g, and quit execution with q. Use the -;; "?" command in edebug to describe other commands. +;; "?" command in edebug to describe other commands. ;; See the Emacs Lisp Reference Manual for more details. ;; If you wish to change the default edebug global command prefix, change: @@ -105,9 +105,9 @@ Use the command `edebug-all-forms' to toggle the value of this option." :group 'edebug) (defcustom edebug-eval-macro-args nil - "*Non-nil means all macro call arguments may be evaluated. + "*Non-nil means all macro call arguments may be evaluated. If this variable is nil, the default, Edebug will *not* wrap -macro call arguments as if they will be evaluated. +macro call arguments as if they will be evaluated. For each macro, a `edebug-form-spec' overrides this option. So to specify exceptions for macros that have some arguments evaluated and some not, you should specify an `edebug-form-spec'." @@ -120,7 +120,7 @@ That takes some time, so if your program does not care what happens to the window configurations, it is better to set this variable to nil. If the value is a list, only the listed windows are saved and -restored. +restored. `edebug-toggle-save-windows' may be used to change this variable." :type '(choice boolean (repeat string)) @@ -154,7 +154,7 @@ Go-nonstop, trace, Trace-fast, continue, and Continue-fast." (defcustom edebug-trace nil "*Non-nil means display a trace of function entry and exit. Tracing output is displayed in a buffer named `*edebug-trace*', one -function entry or exit per line, indented by the recursion level. +function entry or exit per line, indented by the recursion level. You can customize by replacing functions `edebug-print-trace-before' and `edebug-print-trace-after'." @@ -316,7 +316,7 @@ A lambda list keyword is a symbol that starts with `&'." (while (and (symbolp object) (fboundp object)) (setq object (symbol-function object))) object) - + (defun edebug-macrop (object) "Return the macro named by OBJECT, or nil if it is not a macro." (setq object (edebug-lookup-function object)) @@ -367,7 +367,7 @@ Return the result of the last expression in BODY." (defun edebug-pop-to-buffer (buffer &optional window) ;; Like pop-to-buffer, but select window where BUFFER was last shown. - ;; Select WINDOW if it provided and it still exists. Otherwise, + ;; Select WINDOW if it provided and it still exists. Otherwise, ;; if buffer is currently shown in several windows, choose one. ;; Otherwise, find a new window, possibly splitting one. (setq window (if (and (windowp window) (edebug-window-live-p window) @@ -430,10 +430,10 @@ Return the result of the last expression in BODY." (defun edebug-set-windows (window-info) ;; Set either a full window configuration or some window information. (if (listp window-info) - (mapcar (function + (mapcar (function (lambda (one-window-info) (if one-window-info - (apply (function + (apply (function (lambda (window buffer point start hscroll) (if (edebug-window-live-p window) (progn @@ -573,7 +573,7 @@ already is one.)" "Toggle edebugging of all definitions." (interactive) (setq edebug-all-defs (not edebug-all-defs)) - (message "Edebugging all definitions is %s." + (message "Edebugging all definitions is %s." (if edebug-all-defs "on" "off"))) @@ -581,7 +581,7 @@ already is one.)" "Toggle edebugging of all forms." (interactive) (setq edebug-all-forms (not edebug-all-forms)) - (message "Edebugging all forms is %s." + (message "Edebugging all forms is %s." (if edebug-all-forms "on" "off"))) @@ -601,7 +601,7 @@ already is one.)" ;;; Edebug internal data ;; The internal data that is needed for edebugging is kept in the -;; buffer-local variable `edebug-form-data'. +;; buffer-local variable `edebug-form-data'. (make-variable-buffer-local 'edebug-form-data) @@ -670,12 +670,12 @@ already is one.)" (setq edebug-form-data (cons new-entry edebug-form-data))) (defun edebug-clear-form-data-entry (entry) -;; If non-nil, clear ENTRY out of the form data. +;; If non-nil, clear ENTRY out of the form data. ;; Maybe clear the markers and delete the symbol's edebug property? (if entry (progn - ;; Instead of this, we could just find all contained forms. - ;; (put (car entry) 'edebug nil) ; + ;; Instead of this, we could just find all contained forms. + ;; (put (car entry) 'edebug nil) ; ;; (mapcar 'edebug-clear-form-data-entry ; dangerous ;; (get (car entry) 'edebug-dependents)) ;; (set-marker (nth 1 entry) nil) @@ -806,7 +806,7 @@ already is one.)" ;; We just read a list after a dot, which will be abbreviated out. (setq edebug-read-dotted-list nil) ;; Drop the corresponding offset pair. - ;; That is, nconc the reverse of the rest of the offsets + ;; That is, nconc the reverse of the rest of the offsets ;; with the cdr of last offset. (setcdr edebug-current-offset (nconc (nreverse (cdr (cdr edebug-current-offset))) @@ -827,9 +827,9 @@ already is one.)" (defmacro edebug-storing-offsets (point &rest body) `(unwind-protect - (progn + (progn (edebug-store-before-offset ,point) - ,@body) + ,@body) (edebug-store-after-offset (point)))) @@ -913,8 +913,8 @@ This controls how we read comma constructs.") (forward-char 1) (cond ((eq ?\' (following-char)) (forward-char 1) - (list - (edebug-storing-offsets (point) + (list + (edebug-storing-offsets (point) (if (featurep 'cl) 'function* 'function)) (edebug-read-storing-offsets stream))) ((memq (following-char) '(?: ?B ?O ?X ?b ?o ?x ?1 ?2 ?3 ?4 ?5 ?6 @@ -925,7 +925,7 @@ This controls how we read comma constructs.") (defun edebug-read-list (stream) (forward-char 1) ; skip \( - (prog1 + (prog1 (let ((elements)) (while (not (memq (edebug-next-token-class) '(rparen dot))) (if (eq (edebug-next-token-class) 'backquote) @@ -956,7 +956,7 @@ This controls how we read comma constructs.") (defun edebug-read-vector (stream) (forward-char 1) ; skip \[ - (prog1 + (prog1 (let ((elements)) (while (not (eq 'rbracket (edebug-next-token-class))) (setq elements (cons (edebug-read-storing-offsets stream) elements))) @@ -970,7 +970,7 @@ This controls how we read comma constructs.") (defun edebug-new-cursor (expressions offsets) ;; Return a new cursor for EXPRESSIONS with OFFSETS. - (if (vectorp expressions) + (if (vectorp expressions) (setq expressions (append expressions nil))) (cons expressions offsets)) @@ -1017,7 +1017,7 @@ This controls how we read comma constructs.") ;; This is a violation of the cursor encapsulation, but ;; there is plenty of that going on while matching. ;; The following test should always fail. - (if (edebug-empty-cursor cursor) + (if (edebug-empty-cursor cursor) (edebug-no-match cursor "Not enough arguments.")) (setcar cursor (cdr (car cursor))) (setcdr cursor (cdr (cdr cursor))) @@ -1027,7 +1027,7 @@ This controls how we read comma constructs.") (defun edebug-before-offset (cursor) ;; Return the before offset of the cursor. ;; If there is nothing left in the offsets, - ;; return one less than the offset itself, + ;; return one less than the offset itself, ;; which is the after offset for a list. (let ((offset (edebug-cursor-offsets cursor))) (if (consp offset) @@ -1134,7 +1134,7 @@ This controls how we read comma constructs.") defining-form-p (and (listp spec) (eq '&define (car spec))) ;; This is incorrect in general!! But OK most of the time. - def-name (if (and defining-form-p + def-name (if (and defining-form-p (eq 'name (car (cdr spec))) (eq 'symbol (edebug-next-token-class))) (edebug-original-read (current-buffer)))))) @@ -1144,13 +1144,13 @@ This controls how we read comma constructs.") (if (or edebug-all-defs edebug-all-forms) ;; If it is a defining form and we are edebugging defs, ;; then let edebug-list-form start it. - (let ((cursor (edebug-new-cursor + (let ((cursor (edebug-new-cursor (list (edebug-read-storing-offsets (current-buffer))) (list edebug-offsets)))) (car (edebug-make-form-wrapper cursor - (edebug-before-offset cursor) + (edebug-before-offset cursor) (1- (edebug-after-offset cursor)) (list (cons (symbol-name def-kind) (cdr spec)))))) @@ -1159,7 +1159,7 @@ This controls how we read comma constructs.") ;; This only works for defs with simple names. (put def-name 'edebug (point-marker)) ;; Also nil out dependent defs. - '(mapcar (function + '(mapcar (function (lambda (def) (put def-name 'edebug nil))) (get def-name 'edebug-dependents)) @@ -1167,13 +1167,13 @@ This controls how we read comma constructs.") ;; If all forms are being edebugged, explicitly wrap it. (edebug-all-forms - (let ((cursor (edebug-new-cursor + (let ((cursor (edebug-new-cursor (list (edebug-read-storing-offsets (current-buffer))) (list edebug-offsets)))) - (edebug-make-form-wrapper + (edebug-make-form-wrapper cursor - (edebug-before-offset cursor) - (edebug-after-offset cursor) + (edebug-before-offset cursor) + (edebug-after-offset cursor) nil))) ;; Not a defining form, and not edebugging. @@ -1207,11 +1207,11 @@ This controls how we read comma constructs.") ;; since it wraps the list of forms with a call to `edebug-enter'. ;; Uses the dynamically bound vars edebug-def-name and edebug-def-args. ;; Do this after parsing since that may find a name. - (setq edebug-def-name + (setq edebug-def-name (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon"))) `(edebug-enter (quote ,edebug-def-name) - ,(if edebug-inside-func + ,(if edebug-inside-func `(list ;; Doesn't work with more than one def-body!! ;; But the list will just be reversed. @@ -1222,7 +1222,7 @@ This controls how we read comma constructs.") (defvar edebug-form-begin-marker) ; the mark for def being instrumented - + (defvar edebug-offset-index) ; the next available offset index. (defvar edebug-offset-list) ; the list of offset positions. @@ -1238,10 +1238,10 @@ This controls how we read comma constructs.") (defun edebug-make-before-and-after-form (before-index form after-index) ;; Return the edebug form for the current function at offset BEFORE-INDEX - ;; given FORM. Looks like: + ;; given FORM. Looks like: ;; (edebug-after (edebug-before BEFORE-INDEX) AFTER-INDEX FORM) ;; Also increment the offset index for subsequent use. - (list 'edebug-after + (list 'edebug-after (list 'edebug-before before-index) after-index form)) @@ -1252,10 +1252,10 @@ This controls how we read comma constructs.") (defun edebug-unwrap (sexp) "Return the unwrapped SEXP or return it as is if it is not wrapped. -The SEXP might be the result of wrapping a body, which is a list of +The SEXP might be the result of wrapping a body, which is a list of expressions; a `progn' form will be returned enclosing these forms." (if (consp sexp) - (cond + (cond ((eq 'edebug-after (car sexp)) (nth 3 sexp)) ((eq 'edebug-enter (car sexp)) @@ -1285,8 +1285,8 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Skip the first offset. (edebug-set-cursor cursor (edebug-cursor-expressions cursor) (cdr (edebug-cursor-offsets cursor))) - (edebug-make-form-wrapper - cursor + (edebug-make-form-wrapper + cursor form-begin (1- form-end) speclist)) @@ -1298,8 +1298,8 @@ expressions; a `progn' form will be returned enclosing these forms." ;; This is a hack, but I havent figured out a simpler way yet. (let* ((form-data-entry (edebug-get-form-data-entry form-begin form-end)) ;; Set this marker before parsing. - (edebug-form-begin-marker - (if form-data-entry + (edebug-form-begin-marker + (if form-data-entry (edebug-form-data-begin form-data-entry) ;; Buffer must be current-buffer for this to work: (set-marker (make-marker) form-begin)))) @@ -1316,37 +1316,37 @@ expressions; a `progn' form will be returned enclosing these forms." edebug-def-interactive edebug-inside-func;; whether wrapped code executes inside a function. ) - + (setq result (if speclist (edebug-match cursor speclist) ;; else wrap as an enter-form. (edebug-make-enter-wrapper (list (edebug-form cursor))))) - + ;; Set the name here if it was not set by edebug-make-enter-wrapper. - (setq edebug-def-name + (setq edebug-def-name (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon"))) ;; Add this def as a dependent of containing def. Buggy. '(if (and edebug-containing-def-name (not (get edebug-containing-def-name 'edebug-dependents))) (put edebug-containing-def-name 'edebug-dependents - (cons edebug-def-name - (get edebug-containing-def-name + (cons edebug-def-name + (get edebug-containing-def-name 'edebug-dependents)))) ;; Create a form-data-entry or modify existing entry's markers. ;; In the latter case, pointers to the entry remain eq. (if (not form-data-entry) - (setq form-data-entry + (setq form-data-entry (edebug-make-form-data-entry - edebug-def-name + edebug-def-name edebug-form-begin-marker ;; Buffer must be current-buffer. (set-marker (make-marker) form-end) )) - (edebug-set-form-data-entry + (edebug-set-form-data-entry form-data-entry edebug-def-name ;; in case name is changed form-begin form-end)) @@ -1367,7 +1367,7 @@ expressions; a `progn' form will be returned enclosing these forms." (let ((window ;; Find the best window for this buffer. (or (get-buffer-window (current-buffer)) (selected-window)))) - (setq edebug-top-window-data + (setq edebug-top-window-data (cons window (window-start window))))) ;; Store the edebug data in symbol's property list. @@ -1390,14 +1390,14 @@ expressions; a `progn' form will be returned enclosing these forms." (defun edebug-clear-coverage (name) - ;; Create initial coverage vector. + ;; Create initial coverage vector. ;; Only need one per expression, but it is simpler to use stop points. - (put name 'edebug-coverage + (put name 'edebug-coverage (make-vector (length edebug-offset-list) 'unknown))) (defun edebug-form (cursor) - ;; Return the instrumented form for the following form. + ;; Return the instrumented form for the following form. ;; Add the point offsets to the edebug-offset-list for the form. (let* ((form (edebug-top-element-required cursor "Expected form")) (offset (edebug-top-offset cursor))) @@ -1413,13 +1413,13 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Find out if this is a defining form from first symbol. ;; An indirect spec would not work here, yet. (if (and (consp spec) (eq '&define (car spec))) - (edebug-defining-form - new-cursor + (edebug-defining-form + new-cursor (car offset);; before the form - (edebug-after-offset cursor) + (edebug-after-offset cursor) (cons (symbol-name head) (cdr spec))) ;; Wrap a regular form. - (edebug-make-before-and-after-form + (edebug-make-before-and-after-form (edebug-inc-offset (car offset)) (edebug-list-form new-cursor) ;; After processing the list form, the new-cursor is left @@ -1496,7 +1496,7 @@ expressions; a `progn' form will be returned enclosing these forms." (edebug-move-cursor cursor) (edebug-interactive-p-name)) (t - (cons head (edebug-list-form-args + (cons head (edebug-list-form-args head (edebug-move-cursor cursor)))))) ((consp head) @@ -1518,7 +1518,7 @@ expressions; a `progn' form will be returned enclosing these forms." (defconst edebug-max-depth 150) ;; maximum number of matching recursions. -;;; Failure to match +;;; Failure to match ;; This throws to no-match, if there are higher alternatives. ;; Otherwise it signals an error. The place of the error is found @@ -1563,15 +1563,15 @@ expressions; a `progn' form will be returned enclosing these forms." (defun edebug-match-specs (cursor specs remainder-handler) ;; Append results of matching the list of specs. ;; The first spec is handled and the remainder-handler handles the rest. - (let ((edebug-matching-depth + (let ((edebug-matching-depth (if (> edebug-matching-depth edebug-max-depth) (error "too deep - perhaps infinite loop in spec?") (1+ edebug-matching-depth)))) (cond ((null specs) nil) - + ;; Is the spec dotted? - ((atom specs) + ((atom specs) (let ((edebug-dotted-spec t));; Containing spec list was dotted. (edebug-match-specs cursor (list specs) remainder-handler))) @@ -1590,7 +1590,7 @@ expressions; a `progn' form will be returned enclosing these forms." (t;; Process normally. (let* ((spec (car specs)) - (rest) + (rest) (first-char (and (symbolp spec) (aref (symbol-name spec) 0)))) ;;(message "spec = %s first char = %s" spec first-char) (sit-for 1) (nconc @@ -1638,18 +1638,18 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Match a symbol spec. (let* ((spec (get-edebug-spec symbol))) (cond - (spec + (spec (if (consp spec) ;; It is an indirect spec. (edebug-match cursor spec) ;; Otherwise it should be the symbol name of a function. ;; There could be a bug here - maybe need to do edebug-match bindings. (funcall spec cursor))) - + ((null symbol) ;; special case this. (edebug-match-nil cursor)) - ((fboundp symbol) ; is it a predicate? + ((fboundp symbol) ; is it a predicate? (let ((sexp (edebug-top-element-required cursor "Expected" symbol))) ;; Special case for edebug-`. (if (and (listp sexp) (eq (car sexp) ',)) @@ -1700,7 +1700,7 @@ expressions; a `progn' form will be returned enclosing these forms." (if (null specs) (setq specs edebug-&rest)) ;; Reuse the &optional handler with this as the remainder handler. (edebug-&optional-wrapper cursor specs remainder-handler)) - + (defun edebug-match-&rest (cursor specs) ;; Repeatedly use specs until failure. (let ((edebug-&rest specs) ;; remember these @@ -1745,7 +1745,7 @@ expressions; a `progn' form will be returned enclosing these forms." (edebug-no-match cursor "Unexpected")) ;; This means nothing matched, so it is OK. nil) ;; So, return nothing - + (def-edebug-spec &key edebug-match-&key) @@ -1753,11 +1753,11 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Following specs must look like (<name> <spec>) ... ;; where <name> is the name of a keyword, and spec is its spec. ;; This really doesn't save much over the expanded form and takes time. - (edebug-match-&rest + (edebug-match-&rest cursor - (cons '&or + (cons '&or (mapcar (function (lambda (pair) - (vector (format ":%s" (car pair)) + (vector (format ":%s" (car pair)) (car (cdr pair))))) specs)))) @@ -1771,7 +1771,7 @@ expressions; a `progn' form will be returned enclosing these forms." (defun edebug-match-list (cursor specs) ;; The spec is a list, but what kind of list, and what context? (if edebug-dotted-spec - ;; After dotted spec but form did not contain dot, + ;; After dotted spec but form did not contain dot, ;; so match list spec elements as if spliced in. (prog1 (let ((edebug-dotted-spec)) @@ -1792,27 +1792,27 @@ expressions; a `progn' form will be returned enclosing these forms." (edebug-move-cursor cursor) (setq edebug-gate t) form) - (t + (t (error "Bad spec: %s" specs))))) ((listp form) (prog1 - (list (edebug-match-sublist + (list (edebug-match-sublist ;; First offset is for the list form itself. ;; Treat nil as empty list. - (edebug-new-cursor form (cdr (edebug-top-offset cursor))) + (edebug-new-cursor form (cdr (edebug-top-offset cursor))) specs)) (edebug-move-cursor cursor))) ((and (eq 'vector spec) (vectorp form)) ;; Special case: match a vector with the specs. (let ((result (edebug-match-sublist - (edebug-new-cursor + (edebug-new-cursor form (cdr (edebug-top-offset cursor))) (cdr specs)))) (edebug-move-cursor cursor) (list (apply 'vector result)))) - + (t (edebug-no-match cursor "Expected" specs))) ))) @@ -1823,11 +1823,11 @@ expressions; a `progn' form will be returned enclosing these forms." ;;edebug-best-error ;;edebug-error-point ) - (prog1 + (prog1 ;; match with edebug-match-specs so edebug-best-error is not bound. (edebug-match-specs cursor specs 'edebug-match-specs) (if (not (edebug-empty-cursor cursor)) - (if edebug-best-error + (if edebug-best-error (apply 'edebug-no-match cursor edebug-best-error) ;; A failed &rest or &optional spec may leave some args. (edebug-no-match cursor "Failed matching" specs) @@ -1860,7 +1860,7 @@ expressions; a `progn' form will be returned enclosing these forms." ;; This should only be called inside of a spec list to match the remainder ;; of the current list. e.g. ("lambda" &define args def-body) (edebug-make-form-wrapper - cursor + cursor (edebug-before-offset cursor) ;; Find the last offset in the list. (let ((offsets (edebug-cursor-offsets cursor))) @@ -1872,9 +1872,9 @@ expressions; a `progn' form will be returned enclosing these forms." ;; The expression must be a function. ;; This will match any list form that begins with a symbol ;; that has an edebug-form-spec beginning with &define. In - ;; practice, only lambda expressions should be used. + ;; practice, only lambda expressions should be used. ;; I could add a &lambda specification to avoid confusion. - (let* ((sexp (edebug-top-element-required + (let* ((sexp (edebug-top-element-required cursor "Expected lambda expression")) (offset (edebug-top-offset cursor)) (head (and (consp sexp) (car sexp))) @@ -1884,10 +1884,10 @@ expressions; a `progn' form will be returned enclosing these forms." (if (and (consp spec) (eq '&define (car spec))) (prog1 (list - (edebug-defining-form + (edebug-defining-form (edebug-new-cursor sexp offset) (car offset);; before the sexp - (edebug-after-offset cursor) + (edebug-after-offset cursor) (cons (symbol-name head) (cdr spec)))) (edebug-move-cursor cursor)) (edebug-no-match cursor "Expected lambda expression") @@ -2064,7 +2064,7 @@ expressions; a `progn' form will be returned enclosing these forms." (def-edebug-spec \` (backquote-form)) -;; Supports quotes inside backquotes, +;; Supports quotes inside backquotes, ;; but only at the top level inside unquotes. (def-edebug-spec backquote-form (&or @@ -2130,10 +2130,10 @@ expressions; a `progn' form will be returned enclosing these forms." ;; advice.el by Hans Chalupsky (hans@cs.buffalo.edu) (def-edebug-spec ad-dolist ((symbolp form &optional form) body)) -(def-edebug-spec defadvice +(def-edebug-spec defadvice (&define name ;; thing being advised. - (name ;; class is [&or "before" "around" "after" - ;; "activation" "deactivation"] + (name ;; class is [&or "before" "around" "after" + ;; "activation" "deactivation"] name ;; name of advice &rest sexp ;; optional position and flags ) @@ -2241,7 +2241,7 @@ error is signaled again." (defun edebug-enter (edebug-function edebug-args edebug-body) ;; Entering FUNC. The arguments are ARGS, and the body is BODY. ;; Setup edebug variables and evaluate BODY. This function is called - ;; when a function evaluated with edebug-eval-top-level-form is entered. + ;; when a function evaluated with edebug-eval-top-level-form is entered. ;; Return the result of BODY. ;; Is this the first time we are entering edebug since @@ -2249,7 +2249,7 @@ error is signaled again." ;; More precisely, this tests whether Edebug is currently active. (if (not edebug-entered) (let ((edebug-entered t) - ;; Binding max-lisp-eval-depth here is OK, + ;; Binding max-lisp-eval-depth here is OK, ;; but not inside an unwind-protect. ;; Doing it here also keeps it from growing too large. (max-lisp-eval-depth (+ 100 max-lisp-eval-depth)) ; too much?? @@ -2278,7 +2278,7 @@ error is signaled again." (let (;; Don't keep reading from an executing kbd macro ;; within edebug unless edebug-continue-kbd-macro is ;; non-nil. Again, local binding may not be best. - (executing-kbd-macro + (executing-kbd-macro (if edebug-continue-kbd-macro executing-kbd-macro)) ;; Don't get confused by the user's keymap changes. @@ -2292,8 +2292,8 @@ error is signaled again." ;; This may be more than we need, however. (pre-command-hook nil) (post-command-hook nil)) - (setq edebug-execution-mode (or edebug-next-execution-mode - edebug-initial-mode + (setq edebug-execution-mode (or edebug-next-execution-mode + edebug-initial-mode edebug-execution-mode) edebug-next-execution-mode nil) (edebug-enter edebug-function edebug-args edebug-body)) @@ -2302,7 +2302,7 @@ error is signaled again." pre-command-hook edebug-outside-pre-command-hook post-command-hook edebug-outside-post-command-hook ))) - + (let* ((edebug-data (get edebug-function 'edebug)) (edebug-def-mark (car edebug-data)) ; mark at def start (edebug-freq-count (get edebug-function 'edebug-freq-count)) @@ -2326,7 +2326,7 @@ error is signaled again." (defun edebug-enter-trace (edebug-body) (let ((edebug-stack-depth (1+ edebug-stack-depth)) edebug-result) - (edebug-print-trace-before + (edebug-print-trace-before (format "%s args: %s" edebug-function edebug-args)) (prog1 (setq edebug-result (funcall edebug-body)) (edebug-print-trace-after @@ -2341,7 +2341,7 @@ The result of BODY is also printed." edebug-result) (edebug-print-trace-before ,msg) (prog1 (setq edebug-result (progn ,@body)) - (edebug-print-trace-after + (edebug-print-trace-after (format "%s result: %s" ,msg edebug-result))))) (defun edebug-print-trace-before (msg) @@ -2360,11 +2360,11 @@ MSG is printed after `::::} '." (defun edebug-slow-before (edebug-before-index) ;; Debug current function given BEFORE position. - ;; Called from functions compiled with edebug-eval-top-level-form. + ;; Called from functions compiled with edebug-eval-top-level-form. ;; Return the before index. (setcar edebug-offset-indices edebug-before-index) - ;; Increment frequency count + ;; Increment frequency count (aset edebug-freq-count edebug-before-index (1+ (aref edebug-freq-count edebug-before-index))) @@ -2383,7 +2383,7 @@ MSG is printed after `::::} '." ;; Return VALUE. (setcar edebug-offset-indices edebug-after-index) - ;; Increment frequency count + ;; Increment frequency count (aset edebug-freq-count edebug-after-index (1+ (aref edebug-freq-count edebug-after-index))) (if edebug-test-coverage (edebug-update-coverage)) @@ -2455,7 +2455,7 @@ MSG is printed after `::::} '." ;;; (edebug-trace "exp: %s" edebug-value) ;; Test whether we should break. - (setq edebug-break + (setq edebug-break (or edebug-global-break (and edebug-break-data (or (not edebug-break-condition) @@ -2469,12 +2469,12 @@ MSG is printed after `::::} '." (cdr (cdr edebug-data))))) ;; Display if mode is not go, continue, or Continue-fast - ;; or break, or input is pending, + ;; or break, or input is pending, (if (or (not (memq edebug-execution-mode '(go continue Continue-fast))) edebug-break (edebug-input-pending-p)) (edebug-display)) ; <--------------- display - + edebug-value ))) @@ -2525,7 +2525,7 @@ MSG is printed after `::::} '." (edebug-outside-mark (edebug-mark)) edebug-outside-windows ; window or screen configuration edebug-buffer-points - + edebug-eval-buffer ; declared here so we can kill it below (edebug-eval-result-list (and edebug-eval-list (edebug-eval-result-list))) @@ -2544,16 +2544,16 @@ MSG is printed after `::::} '." (if (not (buffer-name edebug-buffer)) (let ((debug-on-error nil)) (error "Buffer defining %s not found" edebug-function))) - + (if (eq 'after edebug-arg-mode) ;; Compute result string now before windows are modified. (edebug-compute-previous-result edebug-value)) (if edebug-save-windows ;; Save windows now before we modify them. - (setq edebug-outside-windows + (setq edebug-outside-windows (edebug-current-windows edebug-save-windows))) - + (if edebug-save-displayed-buffer-points (setq edebug-buffer-points (edebug-get-displayed-buffer-points))) @@ -2569,7 +2569,7 @@ MSG is printed after `::::} '." (setcar edebug-window-data (selected-window)) ;; Now display eval list, if any. - ;; This is done after the pop to edebug-buffer + ;; This is done after the pop to edebug-buffer ;; so that buffer-window correspondence is correct after quitting. (edebug-eval-display edebug-eval-result-list) ;; The evaluation list better not have deleted edebug-window-data. @@ -2578,21 +2578,21 @@ MSG is printed after `::::} '." (setq edebug-buffer-outside-point (point)) (goto-char edebug-point) - + (if (eq 'before edebug-arg-mode) ;; Check whether positions are up-to-date. ;; This assumes point is never before symbol. (if (not (memq (following-char) '(?\( ?\# ?\` ))) (let ((debug-on-error nil)) - (error "Source has changed - reevaluate definition of %s" + (error "Source has changed - reevaluate definition of %s" edebug-function) ))) (setcdr edebug-window-data (edebug-adjust-window (cdr edebug-window-data))) - + ;; Test if there is input, not including keyboard macros. - (if (edebug-input-pending-p) + (if (edebug-input-pending-p) (progn (setq edebug-execution-mode 'step edebug-stop t) @@ -2601,7 +2601,7 @@ MSG is printed after `::::} '." )) ;; Now display arrow based on mode. (edebug-overlay-arrow) - + (cond ((eq 'error edebug-arg-mode) ;; Display error message @@ -2614,12 +2614,12 @@ MSG is printed after `::::} '." (edebug-break (cond (edebug-global-break - (message "Global Break: %s => %s" + (message "Global Break: %s => %s" edebug-global-break-condition edebug-global-break-result)) (edebug-break-condition - (message "Break: %s => %s" - edebug-break-condition + (message "Break: %s => %s" + edebug-break-condition edebug-break-result)) ((not (eq edebug-execution-mode 'Continue-fast)) (message "Break")) @@ -2634,7 +2634,7 @@ MSG is printed after `::::} '." (not (eq edebug-execution-mode 'Continue-fast))) (sit-for 1)) ; Show break message. (edebug-previous-result))) - + (cond (edebug-break (cond @@ -2647,11 +2647,11 @@ MSG is printed after `::::} '." ((eq edebug-execution-mode 'Trace-fast) (edebug-sit-for 0)) ; Force update and continue. ) - + (unwind-protect (if (or edebug-stop (memq edebug-execution-mode '(step next)) - (eq edebug-arg-mode 'error)) + (eq edebug-arg-mode 'error)) (progn ;; (setq edebug-execution-mode 'step) ;; (edebug-overlay-arrow) ; This doesn't always show up. @@ -2672,7 +2672,7 @@ MSG is printed after `::::} '." (setq edebug-trace-window (get-buffer-window edebug-trace-buffer)) (if edebug-trace-window (setq edebug-trace-window-start - (and edebug-trace-window + (and edebug-trace-window (window-start edebug-trace-window)))) ;; Restore windows before continuing. @@ -2688,15 +2688,15 @@ MSG is printed after `::::} '." ;; Unrestore trace window's window-point. (if edebug-trace-window - (set-window-start edebug-trace-window + (set-window-start edebug-trace-window edebug-trace-window-start)) ;; Unrestore edebug-buffer's window-start, if displayed. (let ((window (car edebug-window-data))) - (if (and window (edebug-window-live-p window) + (if (and window (edebug-window-live-p window) (eq (window-buffer) edebug-buffer)) (progn - (set-window-start window (cdr edebug-window-data) + (set-window-start window (cdr edebug-window-data) 'no-force) ;; Unrestore edebug-buffer's window-point. ;; Needed in addition to setting the buffer point @@ -2731,7 +2731,7 @@ MSG is printed after `::::} '." ;; None of the following is done if quit or signal occurs. ;; Restore edebug-buffer's outside point. - ;; (edebug-trace "restore edebug-buffer point: %s" + ;; (edebug-trace "restore edebug-buffer point: %s" ;; edebug-buffer-outside-point) (let ((current-buffer (current-buffer))) (set-buffer edebug-buffer) @@ -2757,7 +2757,7 @@ MSG is printed after `::::} '." ;; Dynamically declared unbound vars (defvar edebug-outside-match-data) ; match data outside of edebug (defvar edebug-backtrace-buffer) ; each recursive edit gets its own -(defvar edebug-inside-windows) +(defvar edebug-inside-windows) (defvar edebug-interactive-p) (defvar edebug-outside-map) @@ -2841,7 +2841,7 @@ MSG is printed after `::::} '." ;; Declare global values local but using the same global value. ;; We could set these to the values for previous edebug call. (last-command-char last-command-char) - (last-command last-command) + (last-command last-command) (this-command this-command) (last-input-char last-input-char) @@ -2862,7 +2862,7 @@ MSG is printed after `::::} '." (debug-on-quit edebug-outside-debug-on-quit) ;; Don't keep defining a kbd macro. - (defining-kbd-macro + (defining-kbd-macro (if edebug-continue-kbd-macro defining-kbd-macro)) ;; others?? @@ -2906,7 +2906,7 @@ MSG is printed after `::::} '." ));; inner let ;; Reset global vars to outside values, in case they have been changed. - (setq + (setq last-command-char edebug-outside-last-command-char last-command-event edebug-outside-last-command-event last-command edebug-outside-last-command @@ -2931,7 +2931,7 @@ MSG is printed after `::::} '." (defun edebug-adjust-window (old-start) ;; If pos is not visible, adjust current window to fit following context. -;;; (message "window: %s old-start: %s window-start: %s pos: %s" +;;; (message "window: %s old-start: %s window-start: %s pos: %s" ;;; (selected-window) old-start (window-start) (point)) (sit-for 5) (if (not (pos-visible-in-window-p)) (progn @@ -2951,7 +2951,7 @@ MSG is printed after `::::} '." (beginning-of-line) (point))))))) (window-start)) - + (defconst edebug-arrow-alist @@ -2968,7 +2968,7 @@ MSG is printed after `::::} '." (defun edebug-overlay-arrow () ;; Set up the overlay arrow at beginning-of-line in current buffer. - ;; The arrow string is derived from edebug-arrow-alist and + ;; The arrow string is derived from edebug-arrow-alist and ;; edebug-execution-mode. (let ((pos (save-excursion (beginning-of-line) (point)))) (setq overlay-arrow-string @@ -2996,13 +2996,13 @@ configurations become the same as the current configuration." (setq edebug-inside-windows (edebug-current-windows t)) (edebug-set-windows edebug-outside-windows) ,@body;; Code to change edebug-save-windows - (setq edebug-outside-windows (edebug-current-windows + (setq edebug-outside-windows (edebug-current-windows edebug-save-windows)) ;; Problem: what about outside windows that are deleted inside? (edebug-set-windows edebug-inside-windows))) (defun edebug-toggle-save-selected-window () - "Toggle the saving and restoring of the selected window. + "Toggle the saving and restoring of the selected window. Also, each time you toggle it on, the inside and outside window configurations become the same as the current configuration." (interactive) @@ -3055,7 +3055,7 @@ Otherwise, toggle for all windows." (interactive) (if (not edebug-active) (error "Edebug is not active")) - (setq edebug-inside-windows + (setq edebug-inside-windows (edebug-current-windows edebug-save-windows)) (edebug-set-windows edebug-outside-windows) (goto-char edebug-outside-point) @@ -3075,15 +3075,15 @@ The default is one second." (save-window-excursion (edebug-pop-to-buffer edebug-outside-buffer) (goto-char edebug-outside-point) - (message "Current buffer: %s Point: %s Mark: %s" - (current-buffer) (point) + (message "Current buffer: %s Point: %s Mark: %s" + (current-buffer) (point) (if (marker-buffer (edebug-mark-marker)) (marker-position (edebug-mark-marker)) "<not set>")) (edebug-sit-for arg) (edebug-pop-to-buffer edebug-buffer (car edebug-window-data))))) -;; Joe Wells, here is a start at your idea of adding a buffer to the internal +;; Joe Wells, here is a start at your idea of adding a buffer to the internal ;; display list. Still need to use this list in edebug-display. '(defvar edebug-display-buffer-list nil @@ -3144,7 +3144,7 @@ The default is one second." (let* ((edebug-def-name (car edebug-stop-point)) (index (cdr edebug-stop-point)) (edebug-data (get edebug-def-name 'edebug)) - + ;; pull out parts of edebug-data (edebug-def-mark (car edebug-data)) (edebug-breakpoints (car (cdr edebug-data))) @@ -3163,7 +3163,7 @@ The default is one second." (car edebug-breakpoints))) (goto-char (+ edebug-def-mark (aref offset-vector (car breakpoint)))) - + (message "%s" (concat (if (nth 2 breakpoint) "Temporary " "") @@ -3179,13 +3179,13 @@ The default is one second." "Modify the breakpoint for the form at point or after it according to FLAG: set if t, clear if nil. Then move to that point. If CONDITION or TEMPORARY are non-nil, add those attributes to -the breakpoint. " +the breakpoint. " (let ((edebug-stop-point (edebug-find-stop-point))) (if edebug-stop-point (let* ((edebug-def-name (car edebug-stop-point)) (index (cdr edebug-stop-point)) (edebug-data (get edebug-def-name 'edebug)) - + ;; pull out parts of edebug-data (edebug-def-mark (car edebug-data)) (edebug-breakpoints (car (cdr edebug-data))) @@ -3209,7 +3209,7 @@ the breakpoint. " (if present (message "Breakpoint unset in %s" edebug-def-name) (message "No breakpoint here"))) - + (setcar (cdr edebug-data) edebug-breakpoints) (goto-char (+ edebug-def-mark (aref offset-vector index))) )))) @@ -3227,8 +3227,8 @@ With prefix argument, make it a temporary breakpoint." (defun edebug-set-global-break-condition (expression) - (interactive (list (read-minibuffer - "Global Condition: " + (interactive (list (read-minibuffer + "Global Condition: " (format "%s" edebug-global-break-condition)))) (setq edebug-global-break-condition expression)) @@ -3319,7 +3319,7 @@ Useful for exiting from trace or continue loop." '(defun edebug-forward () "Proceed to the exit of the next expression to be evaluated." (interactive) - (edebug-set-mode + (edebug-set-mode 'forward "Forward" "Edebug will stop after exiting the next expression.")) @@ -3381,7 +3381,7 @@ go to the end of the last sexp, or if that is the same point, then step." func)))))) (defun edebug-instrument-callee () - "Instrument the definition of the function or macro about to be called. + "Instrument the definition of the function or macro about to be called. Do this when stopped before the form or it will be too late. One side effect of using this command is that the next time the function or macro is called, Edebug will be called there as well." @@ -3399,8 +3399,8 @@ function or macro is called, Edebug will be called there as well." (defun edebug-step-in () - "Step into the definition of the function or macro about to be called. -This first does `edebug-instrument-callee' to ensure that it is + "Step into the definition of the function or macro about to be called. +This first does `edebug-instrument-callee' to ensure that it is instrumented. Then it does `edebug-on-entry' and switches to `go' mode." (interactive) (let ((func (edebug-instrument-callee))) @@ -3421,7 +3421,7 @@ cancelled the first time the function is entered." (interactive "aEdebug on entry to: ") (put function 'edebug-on-entry nil)) - + (if (not (fboundp 'edebug-original-debug-on-entry)) (fset 'edebug-original-debug-on-entry (symbol-function 'debug-on-entry))) '(fset 'debug-on-entry 'edebug-debug-on-entry) ;; Should we do this? @@ -3513,7 +3513,7 @@ Return the result of the last expression." `(save-excursion ; of current-buffer (if edebug-save-windows (progn - ;; After excursion, we will + ;; After excursion, we will ;; restore to current window configuration. (setq edebug-inside-windows (edebug-current-windows edebug-save-windows)) @@ -3565,7 +3565,7 @@ Return the result of the last expression." (edebug-set-windows edebug-inside-windows)) ;; Save values that may have been changed. - (setq + (setq edebug-outside-last-command-char last-command-char edebug-outside-last-command-event last-command-event edebug-outside-last-command last-command @@ -3601,11 +3601,11 @@ Return the result of the last expression." (eval edebug-expr))) (defun edebug-safe-eval (edebug-expr) - ;; Evaluate EXPR safely. + ;; Evaluate EXPR safely. ;; If there is an error, a string is returned describing the error. (condition-case edebug-err (edebug-eval edebug-expr) - (error (edebug-format "%s: %s" ;; could + (error (edebug-format "%s: %s" ;; could (get (car edebug-err) 'error-message) (car (cdr edebug-err)))))) @@ -3650,10 +3650,10 @@ Return the result of the last expression." (defun edebug-report-error (edebug-value) ;; Print an error message like command level does. ;; This also prints the error name if it has no error-message. - (message "%s: %s" + (message "%s: %s" (or (get (car edebug-value) 'error-message) (format "peculiar error (%s)" (car edebug-value))) - (mapconcat (function (lambda (edebug-arg) + (mapconcat (function (lambda (edebug-arg) ;; continuing after an error may ;; complain about edebug-arg. why?? (prin1-to-string edebug-arg))) @@ -3663,7 +3663,7 @@ Return the result of the last expression." (defvar print-level nil) (defvar print-circle nil) (defvar print-readably) ;; defined by lemacs -;; Alternatively, we could change the definition of +;; Alternatively, we could change the definition of ;; edebug-safe-prin1-to-string to only use these if defined. (defun edebug-safe-prin1-to-string (value) @@ -3682,9 +3682,9 @@ Return the result of the last expression." (format "Result: %s = %s" edebug-previous-value (single-key-description edebug-previous-value)) (if edebug-unwrap-results - (setq edebug-previous-value + (setq edebug-previous-value (edebug-unwrap* edebug-previous-value))) - (concat "Result: " + (concat "Result: " (edebug-safe-prin1-to-string edebug-previous-value))))) (defun edebug-previous-result () @@ -3695,10 +3695,10 @@ Return the result of the last expression." ;;; Read, Eval and Print (defun edebug-eval-expression (edebug-expr) - "Evaluate an expression in the outside environment. + "Evaluate an expression in the outside environment. If interactive, prompt for the expression. Print result in minibuffer." - (interactive (list (read-from-minibuffer + (interactive (list (read-from-minibuffer "Eval: " nil read-expression-map t 'read-expression-history))) (princ @@ -3713,12 +3713,12 @@ print value in minibuffer." (edebug-eval-expression (edebug-last-sexp))) (defun edebug-eval-print-last-sexp () - "Evaluate sexp before point in the outside environment; + "Evaluate sexp before point in the outside environment; print value into current buffer." (interactive) (let* ((edebug-form (edebug-last-sexp)) (edebug-result-string - (edebug-outside-excursion + (edebug-outside-excursion (edebug-safe-prin1-to-string (edebug-safe-eval edebug-form)))) (standard-output (current-buffer))) (princ "\n") @@ -3727,14 +3727,14 @@ print value into current buffer." (princ "\n") )) -;;; Edebug Minor Mode +;;; Edebug Minor Mode ;; Global GUD bindings for all emacs-lisp-mode buffers. (define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where) - + (defvar edebug-mode-map nil) (if edebug-mode-map @@ -3758,7 +3758,7 @@ print value into current buffer." (define-key edebug-mode-map "I" 'edebug-instrument-callee) (define-key edebug-mode-map "i" 'edebug-step-in) (define-key edebug-mode-map "o" 'edebug-step-out) - + ;; quitting and stopping (define-key edebug-mode-map "q" 'top-level) (define-key edebug-mode-map "Q" 'edebug-top-level-nonstop) @@ -3771,13 +3771,13 @@ print value into current buffer." (define-key edebug-mode-map "B" 'edebug-next-breakpoint) (define-key edebug-mode-map "x" 'edebug-set-conditional-breakpoint) (define-key edebug-mode-map "X" 'edebug-set-global-break-condition) - + ;; evaluation (define-key edebug-mode-map "r" 'edebug-previous-result) (define-key edebug-mode-map "e" 'edebug-eval-expression) (define-key edebug-mode-map "\C-x\C-e" 'edebug-eval-last-sexp) (define-key edebug-mode-map "E" 'edebug-visit-eval-list) - + ;; views (define-key edebug-mode-map "w" 'edebug-where) (define-key edebug-mode-map "v" 'edebug-view-outside) ;; maybe obsolete?? @@ -3788,7 +3788,7 @@ print value into current buffer." ;; misc (define-key edebug-mode-map "?" 'edebug-help) (define-key edebug-mode-map "d" 'edebug-backtrace) - + (define-key edebug-mode-map "-" 'negative-argument) ;; statistics @@ -3801,7 +3801,7 @@ print value into current buffer." (define-key edebug-mode-map "\C-x " 'edebug-set-breakpoint) (define-key edebug-mode-map "\C-c\C-d" 'edebug-unset-breakpoint) - (define-key edebug-mode-map "\C-c\C-t" + (define-key edebug-mode-map "\C-c\C-t" (function (lambda () (edebug-set-breakpoint t)))) (define-key edebug-mode-map "\C-c\C-l" 'edebug-where) )) @@ -3858,7 +3858,7 @@ print value into current buffer." In addition to all Emacs Lisp commands (except those that modify the buffer) there are local and global key bindings to several Edebug -specific commands. E.g. `edebug-step-mode' is bound to \\[edebug-step-mode] +specific commands. E.g. `edebug-step-mode' is bound to \\[edebug-step-mode] in the Edebug buffer and \\<global-map>\\[edebug-step-mode] in any buffer. Also see bindings for the eval list buffer, *edebug*. @@ -3899,7 +3899,7 @@ edebug-global-break-condition ;; Assumes in outside environment. ;; Don't do any edebug things now. (let ((edebug-execution-mode 'Go-nonstop) - (edebug-trace nil)) + (edebug-trace nil)) (mapcar 'edebug-safe-eval edebug-eval-list))) (defun edebug-eval-display-list (edebug-eval-result-list) @@ -3963,7 +3963,7 @@ May only be called from within edebug-recursive-edit." (progn (forward-sexp 1) (setq new-list (cons (edebug-last-sexp) new-list)))) - + (while (re-search-forward "^;" nil t) (forward-line 1) (skip-chars-forward " \t\n\r") @@ -3972,7 +3972,7 @@ May only be called from within edebug-recursive-edit." (progn (forward-sexp 1) (setq new-list (cons (edebug-last-sexp) new-list))))) - + (setq edebug-eval-list (nreverse new-list)) (edebug-eval-redisplay) (goto-char starting-point))) @@ -3998,7 +3998,7 @@ May only be called from within edebug-recursive-edit." (if edebug-eval-mode-map nil (setq edebug-eval-mode-map (copy-keymap lisp-interaction-mode-map)) - + (define-key edebug-eval-mode-map "\C-c\C-w" 'edebug-where) (define-key edebug-eval-mode-map "\C-c\C-d" 'edebug-delete-eval-item) (define-key edebug-eval-mode-map "\C-c\C-u" 'edebug-update-eval-list) @@ -4037,7 +4037,7 @@ Global commands prefixed by global-edebug-prefix: ;; edebug is not dependent on this, yet. (defun edebug (&optional edebug-arg-mode &rest debugger-args) - "Replacement for debug. + "Replacement for debug. If we are running an edebugged function, show where we last were. Otherwise call debug normally." ;; (message "entered: %s depth: %s edebug-recursion-depth: %s" @@ -4055,7 +4055,7 @@ show where we last were. Otherwise call debug normally." (edebug-break (null edebug-arg-mode)) ;; if called explicitly ) (edebug-display) - (if (eq edebug-arg-mode 'error) + (if (eq edebug-arg-mode 'error) nil edebug-value)) @@ -4081,7 +4081,7 @@ show where we last were. Otherwise call debug normally." last-ok-point) (backtrace) - ;; Clean up the backtrace. + ;; Clean up the backtrace. ;; Not quite right for current edebug scheme. (set-buffer edebug-backtrace-buffer) (setq truncate-lines t) @@ -4092,7 +4092,7 @@ show where we last were. Otherwise call debug normally." ;; Delete interspersed edebug internals. (while (re-search-forward "^ \(?edebug" nil t) (beginning-of-line) - (cond + (cond ((looking-at "^ \(edebug-after") ;; Previous lines may contain code, so just delete this line (setq last-ok-point (point)) @@ -4186,7 +4186,7 @@ reinstrument it." last-index i) ;; Find all indexes on same line. - (while (and (<= 0 (setq i (1- i))) + (while (and (<= 0 (setq i (1- i))) (<= start-of-line (aref edebug-points i)))) ;; Insert all the indices for this line. (forward-line 1) @@ -4202,10 +4202,10 @@ reinstrument it." (goto-char (+ (aref edebug-points i) def-mark)) (- (current-column) (if (= ?\( (following-char)) 0 1))))) - (insert (make-string + (insert (make-string (max 0 (- col (- (point) start-of-count-line))) ?\ ) (if (and (< 0 count) - (not (memq coverage + (not (memq coverage '(unknown ok-coverage)))) "=" "") (if (= count last-count) "" (int-to-string count)) @@ -4291,7 +4291,7 @@ It is removed when you hit any char." :style toggle :selected edebug-test-coverage] ["Save Windows" edebug-toggle-save-windows :style toggle :selected edebug-save-windows] - ["Save Point" + ["Save Point" (edebug-toggle 'edebug-save-displayed-buffer-points) :style toggle :selected edebug-save-displayed-buffer-points] )) @@ -4311,7 +4311,7 @@ It is removed when you hit any char." The condition is evaluated in the outside context. With prefix argument, make it a temporary breakpoint." ;; (interactive "P\nxCondition: ") - (interactive + (interactive (list current-prefix-arg ;; Read condition as follows; getting previous condition is cumbersome: @@ -4329,7 +4329,7 @@ With prefix argument, make it a temporary breakpoint." (cons edebug-break-condition read-expression-history) read-expression-history))) (prog1 - (read-from-minibuffer + (read-from-minibuffer "Condition: " nil read-expression-map t 'edebug-expression-history) (setq read-expression-history edebug-expression-history) @@ -4351,7 +4351,7 @@ With prefix argument, make it a temporary breakpoint." ;; Disabled before edebug-recursive-edit. (eval-when-compile (if edebug-unread-command-char-warning - (put 'unread-command-char 'byte-obsolete-variable + (put 'unread-command-char 'byte-obsolete-variable edebug-unread-command-char-warning))) (eval-when-compile @@ -4362,19 +4362,19 @@ With prefix argument, make it a temporary breakpoint." (defun byte-compile-resolve-functions (funcs) "Say it is OK for the named functions to be unresolved." - (mapcar - (function + (mapcar + (function (lambda (func) (setq byte-compile-unresolved-functions (delq (assq func byte-compile-unresolved-functions) byte-compile-unresolved-functions)))) funcs) nil) - + '(defun byte-compile-resolve-free-references (vars) "Say it is OK for the named variables to be referenced." - (mapcar - (function + (mapcar + (function (lambda (var) (setq byte-compile-free-references (delq var byte-compile-free-references)))) @@ -4383,26 +4383,26 @@ With prefix argument, make it a temporary breakpoint." '(defun byte-compile-resolve-free-assignments (vars) "Say it is OK for the named variables to be assigned." - (mapcar - (function + (mapcar + (function (lambda (var) (setq byte-compile-free-assignments (delq var byte-compile-free-assignments)))) vars) nil) - (byte-compile-resolve-functions - '(reporter-submit-bug-report + (byte-compile-resolve-functions + '(reporter-submit-bug-report edebug-gensym ;; also in cl.el ;; Interfaces to standard functions. - edebug-original-eval-defun + edebug-original-eval-defun edebug-original-read edebug-get-buffer-window edebug-mark edebug-mark-marker - edebug-input-pending-p + edebug-input-pending-p edebug-sit-for - edebug-prin1-to-string + edebug-prin1-to-string edebug-format ;; lemacs zmacs-deactivate-region @@ -4432,7 +4432,7 @@ With prefix argument, make it a temporary breakpoint." (add-hook 'cl-load-hook (function (lambda () (require 'cl-specs))))) -;;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu +;;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu (if (featurep 'cl-read) (add-hook 'edebug-setup-hook (function (lambda () (require 'edebug-cl-read)))) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 954a2afd514..7194d4e54d4 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -92,7 +92,7 @@ ;; In the mean time `grep '^(.*ewoc-[^-]' emacs-lisp/ewoc.el' can help ;; you find all the exported functions: -;; +;; ;; (defun ewoc-create (pretty-printer &optional header footer) ;; (defalias 'ewoc-data 'ewoc--node-data) ;; (defun ewoc-location (node) @@ -394,8 +394,8 @@ MAP-FUNCTION is applied to the first element first. If MAP-FUNCTION returns non-nil the element will be refreshed (its pretty-printer will be called once again). -Note that the buffer for EWOC will be current buffer when MAP-FUNCTION -is called. MAP-FUNCTION must restore the current buffer to BUFFER before +Note that the buffer for EWOC will be current buffer when MAP-FUNCTION +is called. MAP-FUNCTION must restore the current buffer to BUFFER before it returns, if it changes it. If more than two arguments are given, the remaining @@ -410,7 +410,7 @@ arguments will be passed to MAP-FUNCTION." (defun ewoc-filter (ewoc predicate &rest args) "Remove all elements in EWOC for which PREDICATE returns nil. -Note that the buffer for EWOC will be current-buffer when PREDICATE +Note that the buffer for EWOC will be current-buffer when PREDICATE is called. PREDICATE must restore the current buffer before it returns if it changes it. The PREDICATE is called with the element as its first argument. If any @@ -478,7 +478,7 @@ If the EWOC is empty, nil is returned." ;; best-guess is now a "best guess". ;; Find the correct node. First determine in which direction ;; it lies, and then move in that direction until it is found. - + (cond ;; Is pos after the guess? ((>= pos diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 4192209b7d8..74afa4a4a64 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -312,7 +312,7 @@ The library where VARIABLE is defined is searched for in FILE or `find-function-source-path', if non nil, otherwise in `load-path'." (if (not variable) (error "You didn't specify a variable")) - ;; Fixme: I think `symbol-file' should be fixed instead. -- fx + ;; Fixme: I think `symbol-file' should be fixed instead. -- fx (let ((library (or file (symbol-file (cons 'defvar variable))))) (find-function-search-for-symbol variable 'variable library))) diff --git a/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index eb9f8af4105..a176a7ac013 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -103,7 +103,7 @@ is left in the `*gulp*' buffer at the end." (while (setq node (car m-p-alist)) (setq msg (gulp-create-message (cdr node) time)) (setq mail-setup-hook - (lambda () + (lambda () (mail-subject) (insert "It's time for Emacs updates again") (goto-char (point-max)) diff --git a/lisp/emacs-lisp/levents.el b/lisp/emacs-lisp/levents.el index 535d2d36650..13d13beb998 100644 --- a/lisp/emacs-lisp/levents.el +++ b/lisp/emacs-lisp/levents.el @@ -98,8 +98,8 @@ in is the second. This function contains knowledge about what the codes mean -- for example, the number 9 is converted to the character Tab, not the distinct character Control-I. -Beware that character-to-event and event-to-character are not strictly -inverse functions, since events contain much more information than the +Beware that character-to-event and event-to-character are not strictly +inverse functions, since events contain much more information than the ASCII character set can encode." ch) @@ -214,11 +214,11 @@ In this emulation, it returns nil for non-mouse-related events." (defun event-to-character (event &optional lenient) "Returns the closest ASCII approximation to the given event object. If the event isn't a keypress, this returns nil. -If the second argument is non-nil, then this is lenient in its +If the second argument is non-nil, then this is lenient in its translation; it will ignore modifier keys other than control and meta, -and will ignore the shift modifier on those characters which have no -shifted ASCII equivalent (Control-Shift-A for example, will be mapped to -the same ASCII code as Control-A.) If the second arg is nil, then nil +and will ignore the shift modifier on those characters which have no +shifted ASCII equivalent (Control-Shift-A for example, will be mapped to +the same ASCII code as Control-A.) If the second arg is nil, then nil will be returned for events which have no direct ASCII equivalent." (if (symbolp event) (and lenient diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index bda307198f8..bdd174a024f 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -32,7 +32,7 @@ ;; First, it knows about the header conventions for library packages. ;; One entry point supports generating synopses from a library directory. ;; Another can be used to check for missing headers in library files. -;; +;; ;; Another entry point automatically addresses bug mail to a package's ;; maintainer or author. @@ -40,11 +40,11 @@ ;; This file is an example of the header conventions. Note the following ;; features: -;; +;; ;; * Header line --- makes it possible to extract a one-line summary of ;; the package's uses automatically for use in library synopses, KWIC ;; indexes and the like. -;; +;; ;; Format is three semicolons, followed by the filename, followed by ;; three dashes, followed by the summary. All fields space-separated. ;; @@ -55,13 +55,13 @@ ;; ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. ;; ;; * A blank line -;; +;; ;; * Author line --- contains the name and net address of at least ;; the principal author. -;; +;; ;; If there are multiple authors, they should be listed on continuation ;; lines led by ;;<TAB>, like this: -;; +;; ;; ;; Author: Ashwin Ram <Ram-Ashwin@cs.yale.edu> ;; ;; Dave Sill <de5@ornl.gov> ;; ;; David Lawrence <tale@pawl.rpi.edu> @@ -69,10 +69,10 @@ ;; ;; Joe Wells <jbw@maverick.uswest.com> ;; ;; Dave Brennan <brennan@hal.com> ;; ;; Eric Raymond <esr@snark.thyrsus.com> -;; +;; ;; This field may have some special values; notably "FSF", meaning ;; "Free Software Foundation". -;; +;; ;; * Maintainer line --- should be a single name/address as in the Author ;; line, or an address only, or the string "FSF". If there is no maintainer ;; line, the person(s) in the Author field are presumed to be it. The example @@ -81,19 +81,19 @@ ;; that does "send mail to the author" without having to mine the name out by ;; hand. Please be careful about surrounding the network address with <> if ;; there's also a name in the field. -;; +;; ;; * Created line --- optional, gives the original creation date of the ;; file. For historical interest, basically. -;; +;; ;; * Version line --- intended to give the reader a clue if they're looking ;; at a different version of the file than the one they're accustomed to. This ;; may be an RCS or SCCS header. -;; +;; ;; * Adapted-By line --- this is for FSF's internal use. The person named ;; in this field was the one responsible for installing and adapting the ;; package for the distribution. (This file doesn't have one because the ;; author *is* one of the maintainers.) -;; +;; ;; * Keywords line --- used by the finder code (now under construction) ;; for finding Emacs Lisp code related to a topic. ;; @@ -104,13 +104,13 @@ ;; ;; * Commentary line --- enables Lisp code to find the developer's and ;; maintainers' explanations of the package internals. -;; +;; ;; * Change log line --- optional, exists to terminate the commentary ;; section and start a change-log part, if one exists. -;; +;; ;; * Code line --- exists so Lisp can know where commentary and/or ;; change-log sections end. -;; +;; ;; * Footer line --- marks end-of-file so it can be distinguished from ;; an expanded formfeed or the results of truncation. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 60110149388..171f059d09f 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -403,16 +403,16 @@ which see." (defun last-sexp-setup-props (beg end value alt1 alt2) "Set up text properties for the output of `eval-last-sexp-1'. BEG and END are the start and end of the output in current-buffer. -VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the +VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the alternative printed representations that can be displayed." (let ((map (make-sparse-keymap))) (define-key map "\C-m" 'last-sexp-toggle-display) (define-key map [down-mouse-2] 'mouse-set-point) (define-key map [mouse-2] 'last-sexp-toggle-display) (add-text-properties - beg end + beg end `(printed-value (,value ,alt1 ,alt2) - mouse-face highlight + mouse-face highlight keymap ,map help-echo "RET, mouse-2: toggle abbreviated display" rear-nonsticky (mouse-face keymap help-echo @@ -430,7 +430,7 @@ alternative printed representations that can be displayed." (point (point))) (delete-region beg end) (insert (nth 1 value)) - (last-sexp-setup-props beg (point) + (last-sexp-setup-props beg (point) (nth 0 value) (nth 2 value) (nth 1 value)) @@ -508,7 +508,7 @@ With argument, print output into current buffer." (not (null print-level))) (not (string= unabbreviated (buffer-substring-no-properties beg end)))) - (last-sexp-setup-props beg end value + (last-sexp-setup-props beg end value unabbreviated (buffer-substring-no-properties beg end)) )))))) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index b209c210c4f..2e54f224a47 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -31,7 +31,7 @@ :prefix "pp-" :group 'lisp) -(defcustom pp-escape-newlines t +(defcustom pp-escape-newlines t "*Value of `print-escape-newlines' used by pp-* functions." :type 'boolean :group 'pp) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index e62a62b0942..8740a68911f 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -269,7 +269,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.") (define-key reb-lisp-mode-map "\C-c" (lookup-key reb-mode-map "\C-c")) -(defvar reb-subexp-mode-map +(defvar reb-subexp-mode-map (let ((m (make-keymap))) (suppress-keymap m) ;; Again share the "\C-c" keymap for the commands diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 8ac4849d896..486cf006e4b 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -218,7 +218,7 @@ in REGEXP." (regexp-quote (concat (nreverse (string-to-list xiffus)))) close-group)) - + ;; Otherwise, divide the list into those that start with a ;; particular letter and those that do not, and recurse on them. (let* ((char (char-to-string (string-to-char (car strings)))) diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index a58a38bf213..3ac3538822d 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -78,8 +78,8 @@ ;; (and line-start ?\n))) ;; ;; "\\$[I]d: [^ ]+ \\([^ ]+\\) " -;; (rx (and "$Id: " -;; (1+ (not (in " "))) +;; (rx (and "$Id: " +;; (1+ (not (in " "))) ;; " " ;; (submatch (1+ (not (in " ")))) ;; " ")) @@ -90,7 +90,7 @@ ;; etc. ;;; History: -;; +;; ;;; Code: @@ -244,7 +244,7 @@ See also `rx-constituents'." (while (and (not (null op)) (symbolp op)) (setq op (cdr (assq op rx-constituents)))) op) - + (defun rx-check (form) "Check FORM according to its car's parsing info." @@ -396,7 +396,7 @@ FORM is either `(repeat N FORM1)' or `(repeat N M FORM1)'." (defun rx-kleene (form) "Parse and produce code from FORM. FORM is `(OP FORM1)', where OP is one of the `zero-or-one', -`zero-or-more' etc. operators. +`zero-or-more' etc. operators. If OP is one of `*', `+', `?', produce a greedy regexp. If OP is one of `*?', `+?', `??', produce a non-greedy regexp. If OP is anything else, produce a greedy regexp if `rx-greedy-flag' @@ -463,7 +463,7 @@ of all atomic regexps." (cdr (assq form rx-categories))) (error "Unknown category `%s'" form)) t) - + (defun rx-category (form) "Parse and produce code from FORM, which is `(category SYMBOL ...)'." @@ -511,7 +511,7 @@ NO-GROUP non-nil means don't put shy groups around the result." info) ((null info) (error "Unknown Rx form `%s'" form)) - (t + (t (funcall (nth 0 info) form))))) ((consp form) (let ((info (rx-info (car form)))) @@ -549,7 +549,7 @@ CHAR matches any character in SET. SET may be a character or string. Ranges of characters can be specified as `A-Z' in strings. -'(in SET)' +'(in SET)' like `any'. `(not (any SET))' @@ -751,7 +751,7 @@ CHAR `(one-or-more SEXP)' matches one or more occurrences of A. - + `(1+ SEXP)' like `one-or-more'. @@ -763,7 +763,7 @@ CHAR `(zero-or-one SEXP)' matches zero or one occurrences of A. - + `(optional SEXP)' like `zero-or-one'. diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 3618cdd9ea2..82230b1d2ec 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -74,7 +74,7 @@ the file in position 2i+1. Emacs Lisp file suffixes \(.el and .elc\) are stripped from the file names in the list. See the documentation for `list-load-path-shadows' for further information." - + (or path (setq path load-path)) (let (true-names ; List of dirs considered. @@ -86,7 +86,7 @@ See the documentation for `list-load-path-shadows' for further information." files-seen-this-dir ; Files seen so far in this dir. file) ; The current file. - + (while path (setq dir (directory-file-name (file-truename (or (car path) ".")))) @@ -125,7 +125,7 @@ See the documentation for `list-load-path-shadows' for further information." ;; This test prevents us declaring that XXX.el shadows ;; XXX.elc (or vice-versa) when they are in the same directory. (setq files-seen-this-dir (cons file files-seen-this-dir)) - + (if (setq orig-dir (assoc file files)) ;; This file was seen before, we have a shadowing. ;; Report it unless the files are identical. @@ -202,7 +202,7 @@ considered to shadow a later file XXX.el, and vice-versa. When run interactively, the shadowings \(if any\) are displayed in a buffer called `*Shadows*'. Shadowings are located by calling the \(non-interactive\) companion function, `find-emacs-lisp-shadows'." - + (interactive) (let* ((path (copy-sequence load-path)) (tem path) diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 89660e48d77..d7ad3bacd45 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -113,7 +113,7 @@ avoid a more expansive scan. Point is at POS when this function returns." ;; Default values. (unless pos (setq pos (point))) - ;; + ;; (let ((old-ppss (cdr syntax-ppss-last)) (old-pos (car syntax-ppss-last)) (ppss nil) @@ -129,7 +129,7 @@ Point is at POS when this function returns." (incf (car (aref syntax-ppss-stats 0))) (incf (cdr (aref syntax-ppss-stats 0)) (- pos old-pos)) (parse-partial-sexp old-pos pos nil nil old-ppss)) - + (cond ;; Use OLD-PPSS if possible and close enough. ((and (not old-pos) old-ppss @@ -253,7 +253,7 @@ Point is at POS when this function returns." syntax-ppss-max-span)) (push pair syntax-ppss-cache) (setcar syntax-ppss-cache pair))))))))) - + (setq syntax-ppss-last (cons pos ppss)) ppss))) diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index 3a32c0b5169..36b1cffbd85 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el @@ -25,7 +25,7 @@ ;; Boston, MA 02111-1307, USA. ;;; Commentary: - + ;; manages receiving a stream asynchronously, ;; parsing it into transactions, and then calling ;; handler functions @@ -68,7 +68,7 @@ to a tcp server on another machine." (defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq))))) (defun tq-queue-empty (tq) (not (tq-queue tq))) (defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq))) - + ;;; must add to queue before sending! (defun tq-enqueue (tq question regexp closure fn) diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 9ac3beb1949..99ce30be98d 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -212,7 +212,7 @@ of symbols with local bindings." (defun unsafep-function (fun) "Return nil if FUN is a safe function \(either a safe lambda or a symbol that names a safe function). Otherwise -result is a reason code." +result is a reason code." (cond ((eq (car-safe fun) 'lambda) (unsafep fun unsafep-vars)) |