Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103978. ------------------------------------------------------------ revno: 103978 [merge] committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-04-22 20:07:16 -0700 message: Merge from emacs-23; up to r100560. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-04-20 17:39:39 +0000 +++ doc/emacs/ChangeLog 2011-04-23 03:07:16 +0000 @@ -1,3 +1,8 @@ +2011-04-23 Juanma Barranquero + + * mini.texi (Minibuffer Edit): + * screen.texi (Mode Line): Fix typo. + 2011-04-20 Christoph Scholtes * maintaining.texi (Old Revisions): Mention new function vc-ediff. === modified file 'doc/emacs/mini.texi' --- doc/emacs/mini.texi 2011-01-25 04:08:28 +0000 +++ doc/emacs/mini.texi 2011-04-23 03:07:16 +0000 @@ -164,7 +164,7 @@ @vindex resize-mini-windows Normally, the minibuffer window occupies a single screen line. However, if you add two or more lines' worth of text into the -minibuffer, it expands automatically to accomodate the text. The +minibuffer, it expands automatically to accommodate the text. The variable @code{resize-mini-windows} controls the resizing of the minibuffer. The default value is @code{grow-only}, which means the behavior we have just described. If the value is @code{t}, the === modified file 'doc/emacs/screen.texi' --- doc/emacs/screen.texi 2011-01-25 04:08:28 +0000 +++ doc/emacs/screen.texi 2011-04-23 03:07:16 +0000 @@ -259,7 +259,7 @@ additional features on top of the major mode. @xref{Minor Modes}. Some features are listed together with the minor modes whenever they -are turned on, even through they are not really minor modes. +are turned on, even though they are not really minor modes. @samp{Narrow} means that the buffer being displayed has editing restricted to only a portion of its text (@pxref{Narrowing}). @samp{Def} means that a keyboard macro is currently being defined === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-04-08 18:53:26 +0000 +++ doc/lispref/ChangeLog 2011-04-23 03:07:16 +0000 @@ -1,3 +1,13 @@ +2011-04-23 Juanma Barranquero + + * windows.texi (Choosing Window): Fix typo. + +2011-04-23 Chong Yidong + + * frames.texi (Layout Parameters): Note the difference between + querying and setting parameters for left-fringe and right-fringe + (Bug#6930). + 2011-03-21 Stefan Monnier * minibuf.texi (Basic Completion): Be a bit more precise about the === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2011-01-25 04:08:28 +0000 +++ doc/lispref/frames.texi 2011-04-23 03:07:16 +0000 @@ -681,17 +681,20 @@ @itemx right-fringe The default width of the left and right fringes of windows in this frame (@pxref{Fringes}). If either of these is zero, that effectively -removes the corresponding fringe. A value of @code{nil} stands for -the standard fringe width, which is the width needed to display the -fringe bitmaps. +removes the corresponding fringe. + +When you use @code{frame-parameter} to query the value of either of +these two frame parameters, the return value is always an integer. +When using @code{set-frame-parameter}, passing a @code{nil} value +imposes an actual default value of 8 pixels. The combined fringe widths must add up to an integral number of -columns, so the actual default fringe widths for the frame may be -larger than the specified values. The extra width needed to reach an -acceptable total is distributed evenly between the left and right -fringe. However, you can force one fringe or the other to a precise -width by specifying that width as a negative integer. If both widths are -negative, only the left fringe gets the specified width. +columns, so the actual default fringe widths for the frame, as +reported by @code{frame-parameter}, may be larger than what you +specify. Any extra width is distributed evenly between the left and +right fringe. However, you can force one fringe or the other to a +precise width by specifying that width as a negative integer. If both +widths are negative, only the left fringe gets the specified width. @vindex menu-bar-lines, a frame parameter @item menu-bar-lines === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2011-01-25 04:08:28 +0000 +++ doc/lispref/windows.texi 2011-04-23 03:07:16 +0000 @@ -1014,7 +1014,7 @@ windows one above the other that are both at least @code{window-min-height} lines tall. Moreover, if the window that shall be split has a mode line, @code{split-window-sensibly} does not split -the window unless the new window can accomodate a mode line too. +the window unless the new window can accommodate a mode line too. @end defopt @defopt split-width-threshold === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-22 20:15:21 +0000 +++ lisp/ChangeLog 2011-04-23 03:07:16 +0000 @@ -1,3 +1,34 @@ +2011-04-23 Juanma Barranquero + + * buff-menu.el (Buffer-menu--buffers): Fix typo in docstring (bug#8535). + + * play/mpuz.el (mpuz-silent): Doc fix. + (mpuz-mode-map): Use mapc. + (mpuz-put-number-on-board): Rename parameter L to COLUMNS. + (mpuz-letter-to-digit, mpuz-check-all-solved, mpuz-create-buffer): + Fix typos in docstrings. + + * play/doctor.el (doc$, doctor-$, doctor-read-print, doctor-read-token) + (doctor-nounp, doctor-pronounp): Fix typos in docstrings. + + * mouse-drag.el (mouse-drag-throw): Fix typo in docstring. + +2011-04-23 Chong Yidong + + * minibuffer.el (completion--do-completion): Avoid the "Next char + not unique" prompt if icomplete-mode is enabled (Bug#5849). + + * mouse.el (mouse-drag-mode-line-1): Make sure that if we push + mouse-2 into unread-command-events, it is interpreted correctly. + + * image-mode.el (image-type, image-mode-map, image-minor-mode-map) + (image-toggle-display): Doc fix. + +2011-04-23 Stephen Berman + + * textmodes/page.el (what-page): Use line-number-at-pos to + calculate line number (Bug#6825). + 2011-04-22 Juanma Barranquero * eshell/esh-mode.el (find-tag-interactive): Declare function. === modified file 'lisp/ChangeLog.14' --- lisp/ChangeLog.14 2011-01-25 04:08:28 +0000 +++ lisp/ChangeLog.14 2011-04-23 03:07:16 +0000 @@ -4287,7 +4287,7 @@ (proced-descend): New variable. (proced-sort): New arg descend. (proced-sort-interactive): Repeated calls toggle sort order. - (proced-format): Accomodate changes of proced-format-alist. + (proced-format): Accommodate changes of proced-format-alist. Undefined attributes are displayed as "?". (proced-process-attributes): New optional arg pid-list. Ignore processes with empty attribute list. === modified file 'lisp/buff-menu.el' --- lisp/buff-menu.el 2011-04-19 13:44:55 +0000 +++ lisp/buff-menu.el 2011-04-23 03:07:16 +0000 @@ -117,7 +117,7 @@ (defvar Buffer-menu--buffers nil "If non-nil, list of buffers shown in the current buffer-menu. This variable determines whether reverting the buffer lists only -this buffers. It affects both manual reverting and reverting by +these buffers. It affects both manual reverting and reverting by Auto Revert Mode.") (make-variable-buffer-local 'Buffer-menu--buffers) === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2011-04-06 12:18:10 +0000 +++ lisp/cedet/ChangeLog 2011-04-23 03:07:16 +0000 @@ -1,3 +1,11 @@ +2011-04-23 Juanma Barranquero + + * ede/pconf.el (ede-proj-tweak-autoconf, ede-proj-flush-autoconf): + * ede/proj-comp.el (ede-proj-tweak-autoconf, ede-proj-flush-autoconf): + * ede/proj-elisp.el (ede-proj-tweak-autoconf, ede-proj-flush-autoconf) + (ede-proj-tweak-autoconf, ede-proj-flush-autoconf): + * ede/proj-scheme.el (ede-proj-tweak-autoconf): Fix typos in docstrings. + 2011-03-07 Chong Yidong * Version 23.3 released. === modified file 'lisp/cedet/ede/pconf.el' --- lisp/cedet/ede/pconf.el 2011-01-26 08:36:39 +0000 +++ lisp/cedet/ede/pconf.el 2011-04-23 03:07:16 +0000 @@ -159,7 +159,7 @@ (ede-proj-configure-synchronize this)) (defmethod ede-proj-tweak-autoconf ((this ede-proj-target)) - "Tweak the configure file (current buffer) to accomodate THIS." + "Tweak the configure file (current buffer) to accommodate THIS." ;; Check the compilers belonging to THIS, and call the autoconf ;; setup for those compilers. (mapc 'ede-proj-tweak-autoconf (ede-proj-compilers this)) @@ -167,7 +167,7 @@ ) (defmethod ede-proj-flush-autoconf ((this ede-proj-target)) - "Flush the configure file (current buffer) to accomodate THIS. + "Flush the configure file (current buffer) to accommodate THIS. By flushing, remove any cruft that may be in the file. Subsequent calls to `ede-proj-tweak-autoconf' can restore items removed by flush." nil) === modified file 'lisp/cedet/ede/proj-comp.el' --- lisp/cedet/ede/proj-comp.el 2011-01-25 04:08:28 +0000 +++ lisp/cedet/ede/proj-comp.el 2011-04-23 03:07:16 +0000 @@ -236,7 +236,7 @@ ;;; Methods: (defmethod ede-proj-tweak-autoconf ((this ede-compilation-program)) - "Tweak the configure file (current buffer) to accomodate THIS." + "Tweak the configure file (current buffer) to accommodate THIS." (mapcar (lambda (obj) (cond ((stringp obj) @@ -248,7 +248,7 @@ (oref this autoconf))) (defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) - "Flush the configure file (current buffer) to accomodate THIS." + "Flush the configure file (current buffer) to accommodate THIS." nil) (defmacro proj-comp-insert-variable-once (varname &rest body) === modified file 'lisp/cedet/ede/proj-elisp.el' --- lisp/cedet/ede/proj-elisp.el 2011-01-25 04:08:28 +0000 +++ lisp/cedet/ede/proj-elisp.el 2011-04-23 03:07:16 +0000 @@ -208,7 +208,7 @@ (error "Don't know how to update load path")))) (defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp)) - "Tweak the configure file (current buffer) to accomodate THIS." + "Tweak the configure file (current buffer) to accommodate THIS." (call-next-method) ;; Ok, now we have to tweak the autoconf provided `elisp-comp' program. (let ((ec (ede-expand-filename this "elisp-comp" 'newfile))) @@ -232,7 +232,7 @@ (save-buffer)) ))) (defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp)) - "Flush the configure file (current buffer) to accomodate THIS." + "Flush the configure file (current buffer) to accommodate THIS." ;; Remove crufty old paths from elisp-compile (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) ) @@ -372,11 +372,11 @@ ) (defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads)) - "Tweak the configure file (current buffer) to accomodate THIS." + "Tweak the configure file (current buffer) to accommodate THIS." (error "Autoloads not supported in autoconf yet")) (defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads)) - "Flush the configure file (current buffer) to accomodate THIS." + "Flush the configure file (current buffer) to accommodate THIS." nil) (provide 'ede/proj-elisp) === modified file 'lisp/cedet/ede/proj-scheme.el' --- lisp/cedet/ede/proj-scheme.el 2011-01-25 04:08:28 +0000 +++ lisp/cedet/ede/proj-scheme.el 2011-04-23 03:07:16 +0000 @@ -41,7 +41,7 @@ "This target consists of scheme files.") (defmethod ede-proj-tweak-autoconf ((this ede-proj-target-scheme)) - "Tweak the configure file (current buffer) to accomodate THIS." + "Tweak the configure file (current buffer) to accommodate THIS." (autoconf-insert-new-macro "AM_INIT_GUILE_MODULE")) (provide 'ede/proj-scheme) === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2011-04-13 02:16:42 +0000 +++ lisp/image-mode.el 2011-04-23 03:07:16 +0000 @@ -296,8 +296,7 @@ ;;; Image Mode setup (defvar image-type nil - "Current image type. -This variable is used to display the current image type in the mode line.") + "The image type for the current Image mode buffer.") (make-variable-buffer-local 'image-type) (defvar image-mode-previous-major-mode nil @@ -324,13 +323,13 @@ (define-key map [remap beginning-of-buffer] 'image-bob) (define-key map [remap end-of-buffer] 'image-eob) map) - "Major mode keymap for viewing images in Image mode.") + "Mode keymap for `image-mode'.") (defvar image-minor-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-c\C-c" 'image-toggle-display) map) - "Minor mode keymap for viewing images as text in Image mode.") + "Mode keymap for `image-minor-mode'.") (defvar bookmark-make-record-function) @@ -520,9 +519,10 @@ (message "Repeat this command to go back to displaying the file as text")))) (defun image-toggle-display () - "Start or stop displaying an image file as the actual image. -This command toggles between `image-mode-as-text' showing the text of -the image file and `image-mode' showing the image as an image." + "Toggle between image and text display. +If the current buffer is displaying an image file as an image, +call `image-mode-as-text' to switch to text. Otherwise, display +the image by calling `image-mode'." (interactive) (if (image-get-display-property) (image-mode-as-text) === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2011-04-20 22:31:06 +0000 +++ lisp/minibuffer.el 2011-04-23 03:07:16 +0000 @@ -657,7 +657,8 @@ (minibuffer-hide-completions)) ;; Show the completion table, if requested. ((not exact) - (if (cond ((null completion-show-inline-help) t) + (if (cond (icomplete-mode t) + ((null completion-show-inline-help) t) ((eq completion-auto-help 'lazy) (eq this-command last-command)) (t completion-auto-help)) === modified file 'lisp/mouse-drag.el' --- lisp/mouse-drag.el 2011-04-19 13:44:55 +0000 +++ lisp/mouse-drag.el 2011-04-23 03:07:16 +0000 @@ -194,7 +194,7 @@ you'll like it. It's easier to observe than to explain. If the mouse is clicked and released in the same place of time we -assume that the user didn't want to scdebugroll but wanted to whatever +assume that the user didn't want to scroll but wanted to whatever mouse-2 used to do, so we pass it through. Throw scrolling was inspired (but is not identical to) the \"hand\" === modified file 'lisp/mouse.el' --- lisp/mouse.el 2011-02-04 14:54:13 +0000 +++ lisp/mouse.el 2011-04-23 03:07:16 +0000 @@ -541,6 +541,9 @@ ;; a `drag-mouse-1'. In any case `on-link' would have been nulled ;; above if there had been any significant mouse movement. (when (and on-link (eq 'mouse-1 (car-safe event))) + ;; If mouse-2 has never been done by the user, it doesn't + ;; have the necessary property to be interpreted correctly. + (put 'mouse-2 'event-kind 'mouse-click) (push (cons 'mouse-2 (cdr event)) unread-command-events)))))) (defun mouse-drag-mode-line (start-event) === modified file 'lisp/play/doctor.el' --- lisp/play/doctor.el 2011-04-21 12:24:46 +0000 +++ lisp/play/doctor.el 2011-04-23 03:07:16 +0000 @@ -115,11 +115,11 @@ (defun doc// (x) x) (defmacro doc$ (what) - "quoted arg form of doctor-$" + "Quoted arg form of doctor-$." `(doctor-$ ',what)) (defun doctor-$ (what) - "Return the car of a list, rotating the list each time" + "Return the car of a list, rotating the list each time." (let* ((vv (symbol-value what)) (first (car vv)) (ww (append (cdr vv) (list first)))) @@ -832,7 +832,7 @@ (newline arg))) (defun doctor-read-print nil - "top level loop" + "Top level loop." (interactive) (let ((sent (doctor-readin))) (insert "\n") @@ -850,7 +850,7 @@ sentence)) (defun doctor-read-token () - "read one word from buffer" + "Read one word from buffer." (prog1 (intern (downcase (buffer-substring (point) (progn (forward-word 1) @@ -1020,7 +1020,7 @@ nil)))) (defun doctor-nounp (x) - "Returns t if the symbol argument is a noun." + "Return t if the symbol argument is a noun." (or (doctor-pronounp x) (not (or (doctor-verbp x) (equal x 'not) @@ -1028,7 +1028,7 @@ (doctor-modifierp x) )) )) (defun doctor-pronounp (x) - "Returns t if the symbol argument is a pronoun." + "Return t if the symbol argument is a pronoun." (memq x '( i me mine myself we us ours ourselves ourself === modified file 'lisp/play/mpuz.el' --- lisp/play/mpuz.el 2011-04-21 12:24:46 +0000 +++ lisp/play/mpuz.el 2011-04-23 03:07:16 +0000 @@ -39,7 +39,7 @@ (defcustom mpuz-silent 'error "Set this to nil if you want dings on inputs. -t means never ding, and `error' means only ding on wrong input." +The value t means never ding, and `error' means only ding on wrong input." :type '(choice (const :tag "No" nil) (const :tag "Yes" t) (const :tag "If correct" error)) @@ -88,33 +88,14 @@ (defvar mpuz-mode-map (let ((map (make-sparse-keymap))) - (define-key map "a" 'mpuz-try-letter) - (define-key map "b" 'mpuz-try-letter) - (define-key map "c" 'mpuz-try-letter) - (define-key map "d" 'mpuz-try-letter) - (define-key map "e" 'mpuz-try-letter) - (define-key map "f" 'mpuz-try-letter) - (define-key map "g" 'mpuz-try-letter) - (define-key map "h" 'mpuz-try-letter) - (define-key map "i" 'mpuz-try-letter) - (define-key map "j" 'mpuz-try-letter) - (define-key map "A" 'mpuz-try-letter) - (define-key map "B" 'mpuz-try-letter) - (define-key map "C" 'mpuz-try-letter) - (define-key map "D" 'mpuz-try-letter) - (define-key map "E" 'mpuz-try-letter) - (define-key map "F" 'mpuz-try-letter) - (define-key map "G" 'mpuz-try-letter) - (define-key map "H" 'mpuz-try-letter) - (define-key map "I" 'mpuz-try-letter) - (define-key map "J" 'mpuz-try-letter) + (mapc (lambda (ch) + (define-key map (char-to-string ch) 'mpuz-try-letter)) + "abcdefghijABCDEFGHIJ") (define-key map "\C-g" 'mpuz-offer-abort) (define-key map "?" 'describe-mode) map) "Local keymap to use in Mult Puzzle.") - - (defun mpuz-mode () "Multiplication puzzle mode. @@ -171,7 +152,7 @@ "A permutation from [0..9] to [0..9].") (defvar mpuz-letter-to-digit (make-vector 10 0) - "The inverse of mpuz-digit-to-letter.") + "The inverse of `mpuz-digit-to-letter'.") (defmacro mpuz-to-digit (letter) (list 'aref 'mpuz-letter-to-digit letter)) @@ -198,17 +179,16 @@ (defvar mpuz-board (make-vector 10 nil) "The board associates to any digit the list of squares where it appears.") -(defun mpuz-put-number-on-board (number row &rest l) +(defun mpuz-put-number-on-board (number row &rest columns) "Put (last digit of) NUMBER on ROW and COLUMNS of the puzzle board." (let (digit) - (while l + (dolist (column columns) (setq digit (% number 10) - number (/ number 10)) - (aset mpuz-board digit `((,row . ,(car l)) ,@(aref mpuz-board digit))) - (setq l (cdr l))))) + number (/ number 10)) + (aset mpuz-board digit `((,row . ,column) ,@(aref mpuz-board digit)))))) (defun mpuz-check-all-solved (&optional row col) - "Check whether all digits have been solved. Return t if yes." + "Check whether all digits have been solved. Return t if yes." (catch 'solved (let (A B1 B2 C D E squares) (and mpuz-solve-when-trivial @@ -294,7 +274,7 @@ "The general picture of the puzzle screen, as a string.") (defun mpuz-create-buffer () - "Create (or recreate) the puzzle buffer. Return it." + "Create (or recreate) the puzzle buffer. Return it." (let ((buf (get-buffer-create "*Mult Puzzle*")) (face '(face mpuz-text)) buffer-read-only) === modified file 'lisp/textmodes/page.el' --- lisp/textmodes/page.el 2011-01-25 04:08:28 +0000 +++ lisp/textmodes/page.el 2011-04-23 03:07:16 +0000 @@ -156,9 +156,9 @@ (if (= (match-beginning 0) (match-end 0)) (forward-char 1)) (setq count (1+ count))) - (message "Page %d, line %d" - count - (1+ (count-lines (point) opoint))))))) + (message "Page %d, line %d" count (line-number-at-pos opoint)))))) + + ;;; Place `provide' at end of file. (provide 'page) === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-19 10:48:30 +0000 +++ src/ChangeLog 2011-04-23 03:07:16 +0000 @@ -1,3 +1,21 @@ +2011-04-23 Eli Zaretskii + + * s/ms-w32.h (localtime): Redirect to sys_localtime. + + * w32.c: Include . + (sys_localtime): New function. + +2011-04-23 Chong Yidong + + * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451). + + * buffer.c (syms_of_buffer): Doc fix (Bug#6902). + +2011-04-23 Samuel Thibault (tiny change) + + * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on + zombies (Bug#8467). + 2011-04-19 Eli Zaretskii * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of === modified file 'src/buffer.c' --- src/buffer.c 2011-04-14 19:34:42 +0000 +++ src/buffer.c 2011-04-23 03:07:16 +0000 @@ -5551,7 +5551,8 @@ DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), make_number (LISP_INT_TAG), - doc: /* *Distance between tab stops (for display of tab characters), in columns. */); + doc: /* *Distance between tab stops (for display of tab characters), in columns. +This should be an integer greater than zero. */); DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil, doc: /* *Non-nil means display control chars with uparrow. === modified file 'src/dispextern.h' --- src/dispextern.h 2011-04-17 18:40:55 +0000 +++ src/dispextern.h 2011-04-23 03:07:16 +0000 @@ -62,7 +62,7 @@ #ifdef HAVE_NS #include "nsgui.h" -/* following typedef needed to accomodate the MSDOS port, believe it or not */ +/* Following typedef needed to accommodate the MSDOS port, believe it or not. */ typedef struct ns_display_info Display_Info; typedef Pixmap XImagePtr; typedef XImagePtr XImagePtr_or_DC; === modified file 'src/msdos.c' --- src/msdos.c 2011-04-06 17:49:21 +0000 +++ src/msdos.c 2011-04-23 03:07:16 +0000 @@ -842,7 +842,7 @@ /* According to RBIL (INTERRUP.A, V-1000), 160 is the maximum possible width of a DOS display in any known text mode. We multiply by 2 to - accomodate the screen attribute byte. */ + accommodate the screen attribute byte. */ #define MAX_SCREEN_BUF 160*2 extern unsigned char *encode_terminal_code (struct glyph *, int, === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2011-02-16 18:47:21 +0000 +++ src/s/ms-w32.h 2011-04-23 03:07:16 +0000 @@ -204,6 +204,7 @@ #define dup2 sys_dup2 #define fopen sys_fopen #define link sys_link +#define localtime sys_localtime #define mkdir sys_mkdir #undef mktemp #define mktemp sys_mktemp === modified file 'src/sysdep.c' --- src/sysdep.c 2011-04-16 21:26:33 +0000 +++ src/sysdep.c 2011-04-23 03:07:16 +0000 @@ -304,7 +304,7 @@ { while (1) { -#if defined (BSD_SYSTEM) || defined (HPUX) +#if (defined (BSD_SYSTEM) || defined (HPUX)) && !defined(__GNU__) /* Note that kill returns -1 even if the process is just a zombie now. But inevitably a SIGCHLD interrupt should be generated and child_sig will do wait3 and make the process go away. */ === modified file 'src/w32.c' --- src/w32.c 2011-04-06 16:05:49 +0000 +++ src/w32.c 2011-04-23 03:07:16 +0000 @@ -34,6 +34,7 @@ #include /* for _mbspbrk */ #include #include +#include /* must include CRT headers *before* config.h */ @@ -62,6 +63,8 @@ #undef strerror +#undef localtime + #include "lisp.h" #include @@ -1942,6 +1945,12 @@ tv->tv_sec = tb.time; tv->tv_usec = tb.millitm * 1000L; + /* Implementation note: _ftime sometimes doesn't update the dstflag + according to the new timezone when the system timezone is + changed. We could fix that by using GetSystemTime and + GetTimeZoneInformation, but that doesn't seem necessary, since + Emacs always calls gettimeofday with the 2nd argument NULL (see + EMACS_GET_TIME). */ if (tz) { tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ @@ -5678,6 +5687,19 @@ return nchars; } +/* The Windows CRT functions are "optimized for speed", so they don't + check for timezone and DST changes if they were last called less + than 1 minute ago (see http://support.microsoft.com/kb/821231). So + all Emacs features that repeatedly call time functions (e.g., + display-time) are in real danger of missing timezone and DST + changes. Calling tzset before each localtime call fixes that. */ +struct tm * +sys_localtime (const time_t *t) +{ + tzset (); + return localtime (t); +} + static void check_windows_init_file (void) { === modified file 'src/xdisp.c' --- src/xdisp.c 2011-04-18 23:21:31 +0000 +++ src/xdisp.c 2011-04-23 03:07:16 +0000 @@ -26997,6 +26997,7 @@ mini_w = XWINDOW (minibuf_window); root_window = FRAME_ROOT_WINDOW (XFRAME (WINDOW_FRAME (mini_w))); + echo_area_window = minibuf_window; if (!noninteractive) { ------------------------------------------------------------ revno: 103977 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-04-22 19:18:10 -0700 message: * lisp/gnus/gnus-sum.el (gnus-extra-headers): Bump :version. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-23 00:08:28 +0000 +++ lisp/gnus/ChangeLog 2011-04-23 02:18:10 +0000 @@ -1,3 +1,7 @@ +2011-04-23 Glenn Morris + + * gnus-sum.el (gnus-extra-headers): Bump :version. + 2011-04-22 Teodor Zlatanov * gnus-registry.el (gnus-registry-ignore-group-p): Test specifically === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-04-22 00:37:01 +0000 +++ lisp/gnus/gnus-sum.el 2011-04-23 02:18:10 +0000 @@ -1130,7 +1130,7 @@ (defcustom gnus-extra-headers '(To Cc Keywords Gcc Newsgroups) "*Extra headers to parse." - :version "21.1" + :version "24.1" ; added Cc Keywords Gcc :group 'gnus-summary :type '(repeat symbol)) ------------------------------------------------------------ revno: 103976 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-04-22 19:15:03 -0700 message: Revert incorrect change to copyright years. diff: === modified file 'etc/emacs-buffer.gdb' --- etc/emacs-buffer.gdb 2011-04-22 23:29:02 +0000 +++ etc/emacs-buffer.gdb 2011-04-23 02:15:03 +0000 @@ -1,6 +1,6 @@ # emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps -# Copyright (C) 2005, 06, 2011 Free Software Foundation, Inc. +# Copyright (C) 2005-2011 Free Software Foundation, Inc. # Maintainer: Noah Friedman # Created: 2005-04-28 ------------------------------------------------------------ revno: 103975 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2011-04-23 00:08:28 +0000 message: gnus-registry.el (gnus-registry-ignore-group-p): Test specifically for the case where `gnus-registry-ignored-groups' is a list of lists, and don't call `gnus-parameter-registry-ignore' otherwise. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-22 01:01:32 +0000 +++ lisp/gnus/ChangeLog 2011-04-23 00:08:28 +0000 @@ -1,5 +1,11 @@ 2011-04-22 Teodor Zlatanov + * gnus-registry.el (gnus-registry-ignore-group-p): Test specifically + for the case where `gnus-registry-ignored-groups' is a list of lists, + and don't call `gnus-parameter-registry-ignore' otherwise. + +2011-04-21 Teodor Zlatanov + * nnimap.el (nnimap-user): New backend variable. (nnimap-open-connection-1): Use it. (nnimap-credentials): Accept user parameter so it's explicit what user === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2011-04-22 00:37:01 +0000 +++ lisp/gnus/gnus-registry.el 2011-04-23 00:08:28 +0000 @@ -666,8 +666,7 @@ Consults `gnus-registry-ignored-groups' and `nnmail-split-fancy-with-parent-ignore-groups'." (and group - (or (gnus-parameter-registry-ignore group) - (gnus-grep-in-list + (or (gnus-grep-in-list group (delq nil (mapcar (lambda (g) (cond @@ -675,6 +674,11 @@ ((and (listp g) (nth 1 g)) (nth 0 g)) (t nil))) gnus-registry-ignored-groups))) + ;; only use `gnus-parameter-registry-ignore' if + ;; `gnus-registry-ignored-groups' is a list of lists + ;; (it can be a list of regexes) + (and (listp (nth 0 gnus-registry-ignored-groups)) + (gnus-parameter-registry-ignore group)) (gnus-grep-in-list group nnmail-split-fancy-with-parent-ignore-groups)))) ------------------------------------------------------------ revno: 103974 committer: Noah Friedman branch nick: trunk timestamp: Fri 2011-04-22 16:29:02 -0700 message: Add trailing underscores to appropriate member names, per change tromey@redhat.com-20110214153919-bxkckrdmmg4qhyyj of src/lisp.h. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-04-20 17:33:09 +0000 +++ etc/ChangeLog 2011-04-22 23:29:02 +0000 @@ -1,3 +1,9 @@ +2011-04-22 Noah Friedman + + * emacs-buffer.gdb: Add trailing underscores to appropriate member + names, per change tromey@redhat.com-20110214153919-bxkckrdmmg4qhyyj + of src/lisp.h. + 2011-04-08 Christoph Scholtes * NEWS: Document new function `vc-ediff'. === modified file 'etc/emacs-buffer.gdb' --- etc/emacs-buffer.gdb 2011-01-25 04:08:28 +0000 +++ etc/emacs-buffer.gdb 2011-04-22 23:29:02 +0000 @@ -1,12 +1,8 @@ # emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps -# Copyright (C) 2005-2011 Free Software Foundation, Inc. +# Copyright (C) 2005, 06, 2011 Free Software Foundation, Inc. # Maintainer: Noah Friedman -# Status: Works with Emacs 22.0.51.1 (prerelease) as of 2006-01-12. -# Older cvs snapshots, and released versions, will not work due to -# changes in lisp data structures. But there are older versions of -# this gdb script which work with those versions. # Created: 2005-04-28 # This file is part of GNU Emacs. @@ -37,6 +33,10 @@ # `ysave-buffer', and `ybuffer-contents'. The `y' prefix avoids any # namespace collisions with emacs/src/.gdbinit. +# Since the internal data structures in Emacs occasionally from time to +# time, you should use the version of this file that came with your +# particular Emacs version; older versions might not work anymore. + # Example usage: # # $ gdb /export/src/emacs/2005-05-02--03-17/src/emacs core.emacs.6.9845 @@ -107,16 +107,16 @@ ygetptr $buf set $buf = (struct buffer *) $ptr - if ! ($files_only && $buf->filename == Qnil) - ygetptr $buf->name + if ! ($files_only && $buf->filename_ == Qnil) + ygetptr $buf->name_ set $name = ((struct Lisp_String *) $ptr)->data set $modp = ($buf->text->modiff > $buf->text->save_modiff) ? '*' : ' ' - ygetptr $buf->mode_name + ygetptr $buf->mode_name_ set $mode = ((struct Lisp_String *) $ptr)->data - if $buf->filename != Qnil - ygetptr $buf->filename + if $buf->filename_ != Qnil + ygetptr $buf->filename_ printf "%2d %c %9d %-20s %-10s %s\n", \ $i, $modp, ($buf->text->z_byte - 1), $name, $mode, \ ((struct Lisp_String *) $ptr)->data @@ -193,7 +193,7 @@ end define yget-current-buffer-name - set $this = $ycurrent_buffer->name + set $this = $ycurrent_buffer->name_ ygetptr $this set $ycurrent_buffer_name = ((struct Lisp_String *) $ptr)->data end @@ -267,4 +267,3 @@ # local variables: # mode: gdb-script # end: - ------------------------------------------------------------ revno: 103973 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-04-22 22:15:21 +0200 message: lisp/eshell/esh-mode.el (find-tag-interactive): Small cleanup. * eshell/esh-mode.el (find-tag-interactive): Declare function. (eshell-find-tag): Remove `with-no-warnings', unneeded now. Pass argument NO-DEFAULT to `find-tag-interactive'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-22 18:44:26 +0000 +++ lisp/ChangeLog 2011-04-22 20:15:21 +0000 @@ -1,5 +1,11 @@ 2011-04-22 Juanma Barranquero + * eshell/esh-mode.el (find-tag-interactive): Declare function. + (eshell-find-tag): Remove `with-no-warnings', unneeded now. + Pass argument NO-DEFAULT to `find-tag-interactive'. + +2011-04-22 Juanma Barranquero + Lexical-binding cleanup. * progmodes/ada-mode.el (ada-after-change-function, ada-loose-case-word) === modified file 'lisp/eshell/esh-mode.el' --- lisp/eshell/esh-mode.el 2011-03-05 20:07:27 +0000 +++ lisp/eshell/esh-mode.el 2011-04-22 20:15:21 +0000 @@ -497,6 +497,8 @@ (if intercept (setq this-command 'eshell-self-insert-command))))) +(declare-function find-tag-interactive "etags" (prompt &optional no-default)) + (defun eshell-find-tag (&optional tagname next-p regexp-p) "A special version of `find-tag' that ignores read-onlyness." (interactive) @@ -504,8 +506,7 @@ (let ((inhibit-read-only t) (no-default (eobp)) (find-tag-default-function 'ignore)) - (with-no-warnings - (setq tagname (car (find-tag-interactive "Find tag: ")))) + (setq tagname (car (find-tag-interactive "Find tag: " no-default))) (find-tag tagname next-p regexp-p))) (defun eshell-move-argument (limit func property arg) ------------------------------------------------------------ revno: 103972 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-04-22 20:44:26 +0200 message: lisp/progmodes/*.el: Lexical-binding cleanup. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-22 02:35:48 +0000 +++ lisp/ChangeLog 2011-04-22 18:44:26 +0000 @@ -1,3 +1,161 @@ +2011-04-22 Juanma Barranquero + + Lexical-binding cleanup. + + * progmodes/ada-mode.el (ada-after-change-function, ada-loose-case-word) + (ada-no-auto-case, ada-capitalize-word, ada-untab, ada-narrow-to-defun): + * progmodes/ada-prj.el (ada-prj-initialize-values) + (ada-prj-display-page, ada-prj-field-modified, ada-prj-display-help) + (ada-prj-show-value): + * progmodes/ada-xref.el (ada-find-any-references, ada-gdb-application): + * progmodes/antlr-mode.el (antlr-with-displaying-help-buffer) + (antlr-invalidate-context-cache, antlr-options-menu-filter) + (antlr-language-option-extra, antlr-c++-mode-extra, antlr-run-tool): + * progmodes/bug-reference.el (bug-reference-push-button): + * progmodes/fortran.el (fortran-line-length): + * progmodes/glasses.el (glasses-change): + * progmodes/octave-mod.el (octave-fill-paragraph): + * progmodes/python.el (python-mode, python-pdbtrack-track-stack-file) + (python-pdbtrack-grub-for-buffer, python-sentinel): + * progmodes/sql.el (sql-save-connection): + * progmodes/tcl.el (tcl-indent-command, tcl-popup-menu): + * progmodes/xscheme.el (xscheme-enter-debugger-mode): + Mark unused parameters. + + * progmodes/compile.el (compilation--flush-directory-cache) + (compilation--flush-parse, compile-internal): Mark unused parameters. + (compilation-buffer-name): Rename parameter MODE-NAME to NAME-OF-MODE. + (compilation-next-error-function): Remove unused variable `timestamp'. + + * progmodes/cpp.el (cpp-parse-close): Remove unused variable `begin'. + (cpp-signal-read-only, cpp-grow-overlay): Mark unused parameters. + + * progmodes/dcl-mode.el (dcl-end-of-command): + Remove unused variable `start'. + (dcl-calc-command-indent-multiple, dcl-calc-cont-indent-relative) + (dcl-option-value-basic, dcl-option-value-offset) + (dcl-option-value-margin-offset, dcl-option-value-comment-line): + Mark unused parameters. + (dcl-save-local-variable): Remove unused variable `val'. + (mode): Declare. + + * progmodes/delphi.el (delphi-save-state, delphi-after-change): + Mark unused parameters. + (delphi-ignore-changes): Move before first use. + (delphi-charset-token-at): Remove unused variable `start'. + (delphi-else-start): Remove unused variable `if-count'. + (delphi-comment-block-start, delphi-comment-block-end): + Remove unused variable `kind'. + (delphi-indent-line): Remove unused variable `new-point'. + + * progmodes/ebrowse.el (ebrowse-files-list) + (ebrowse-list-of-matching-members, ebrowse-tags-list-members-in-file): + Mark unused parameters. Don't quote `lambda'. + (ebrowse-sort-tree-list, ebrowse-same-tree-member-buffer-list): + Don't quote `lambda'. + (ebrowse-revert-tree-buffer-from-file, ebrowse-tags-choose-class) + (ebrowse-goto-visible-member/all-member-lists): Mark unused parameters. + (ebrowse-create-tree-buffer): Rename parameter OBARRAY to CLASSES. + (ebrowse-toggle-mark-at-point): Remove unused variable `pnt'. + Use `ignore-errors'. + (ebrowse-frozen-tree-buffer-name, ebrowse-find-source-file) + (ebrowse-view/find-file-and-search-pattern) + (ebrowse-view/find-member-declaration/definition): + Rename parameter TAGS-FILE-NAME to TAGS-FILE. + (ebrowse-find-class-declaration, ebrowse-view-class-declaration): + Rename parameter PREFIX-ARG to PREFIX. + (ebrowse-tags-read-name): Remove unused variables `start' and + `member-info'. + (ebrowse-display-member-buffer): Rename variable `tags-file-name' + to `tags-file'. + + * progmodes/etags.el (local-find-tag-hook): Declare. + (tag-partial-file-name-match-p, tag-any-match-p, list-tags): + Mark unused parameters. + + * progmodes/executable.el (compilation-error-regexp-alist): Declare. + (executable-interpret): Mark unused parameter. + + * progmodes/flymake.el (flymake-process-sentinel) + (flymake-after-change-function) + (flymake-create-temp-with-folder-structure) + (flymake-get-include-dirs-dot): Mark unused parameters. + (flymake-safe-delete-directory): Remove unused variable `err'. + + * progmodes/gdb-mi.el (speedbar-change-initial-expansion-list) + (speedbar-timer-fn, speedbar-line-text) + (speedbar-change-expand-button-char, speedbar-delete-subblock) + (speedbar-center-buffer-smartly): Declare functions. + (gdb-find-watch-expression): Remove unused variable `array'. + (gdb-edit-value, gdb-gdb, gdb-ignored-notification, gdb-thread-created) + (gdb-starting): Mark unused parameters. + (gud-gdbmi-marker-filter): Remove unused variable `output-record'. + (gdb-table-string): Remove unused variable `res'. + (gdb-place-breakpoints): Remove unused variables `flag' and `bptno'. + (gdb-disassembly-handler-custom): Remove unused variable `pos'. + (gdb-display-buffer): Remove unused variable `cur-size'. + + * progmodes/gud.el (gud-def): Use `defalias' instead of `defun' to + allow lexical-binding compilation. + (gud-expansion-speedbar-buttons, gud-gdb-goto-stackframe) + (gud-dbx-massage-args, gud-xdb-massage-args, gud-perldb-massage-args) + (gud-jdb-massage-args, gud-jdb-find-source, gud-find-class): + Mark unused parameters. + (gud-gdb-marker-filter): Remove unused variable `match'. + (gud-find-class): Bind `syntax-symbol' and `syntax-point' to suitable + lambda expressions and funcall them, instead of using `fset'. + + * progmodes/hideif.el (hif-parse-if-exp): Rename parameter + HIF-TOKEN-LIST to TOKEN-LIST and let-bind `hif-token-list'. + + * progmodes/hideshow.el (hs-hide-block-at-point): Remove unused + variable `header-beg'; use `let'. + + * progmodes/icon.el (indent-icon-exp): Remove unused variables + `restart', `last-sexp' and `at-do'. + + * progmodes/js.el (js--debug): Mark unused parameter. + (js--parse-state-at-point): Remove unused variable `bound'; use `let'. + (js--splice-into-items): Remove unused variable `item'. + (js--read-symbol, js--read-tab): Pass 1/-1 to `ido-mode', not t/nil. + + * progmodes/make-mode.el (makefile-make-font-lock-keywords): + Rename parameter FONT-LOCK-KEYWORDS to FL-KEYWORDS. + (makefile-complete): Remove unused variable `try'. + (makefile-fill-paragraph, makefile-match-function-end): + Mark unused parameters. + + * progmodes/octave-inf.el (inferior-octave-complete): + Remove unused variable `proc'. + (inferior-octave-output-digest): Mark unused parameter. + + * progmodes/perl-mode.el (perl-calculate-indent): + Remove unused variable `err'. + + * progmodes/prolog.el (prolog-mode-keybindings-inferior) + (prolog-indent-line): Mark unused parameters. + (prolog-indent-line): Remove unused variable `beg'. + + * progmodes/ps-mode.el (reporter-prompt-for-summary-p) + (reporter-dont-compact-list): Declare. + + * progmodes/sh-script.el (sh-font-lock-quoted-subshell): + Remove unused variable `char'. + (sh-debug): Mark unused parameter. + (sh-get-indent-info): Remove unused variable `start'. + (sh-calculate-indent): Remove unused variable `var'. + + * progmodes/simula.el (simula-popup-menu): Mark unused parameter. + (simula-electric-keyword): Remove unused variable `null'. + (simula-search-backward, simula-search-forward): Remove unused + variables `begin' and `end'. + + * progmodes/vera-mode.el (vera-guess-basic-syntax): + Remove unused variable `pos'. + (vera-electric-tab, vera-comment-uncomment-region): + Mark unused parameters. + (vera-electric-tab): Rename parameter PREFIX-ARG to PREFIX. + 2011-04-22 Chong Yidong * emacs-lisp/package.el (package--builtins, package-alist) === modified file 'lisp/progmodes/ada-mode.el' --- lisp/progmodes/ada-mode.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/ada-mode.el 2011-04-22 18:44:26 +0000 @@ -966,7 +966,7 @@ (unless modified (restore-buffer-modified-p nil)))) -(defun ada-after-change-function (beg end old-len) +(defun ada-after-change-function (beg end _old-len) "Called when the region between BEG and END was changed in the buffer. OLD-LEN indicates what the length of the replaced text was." (save-excursion @@ -1675,7 +1675,7 @@ '( ?` ?_ ?# ?% ?& ?* ?( ?) ?- ?= ?+ ?| ?\; ?: ?' ?\" ?< ?, ?. ?> ?/ ?\n 32 ?\r ))) -(defun ada-loose-case-word (&optional arg) +(defun ada-loose-case-word (&optional _arg) "Upcase first letter and letters following `_' in the following word. No other letter is modified. ARG is ignored, and is there for compatibility with `capitalize-word' only." @@ -1691,7 +1691,7 @@ (insert-char (upcase (following-char)) 1) (delete-char 1))))) -(defun ada-no-auto-case (&optional arg) +(defun ada-no-auto-case (&optional _arg) "Do nothing. ARG is ignored. This function can be used for the auto-casing variables in Ada mode, to adapt to unusal auto-casing schemes. Since it does nothing, you can for @@ -1700,7 +1700,7 @@ See also `ada-auto-case' to disable auto casing altogether." nil) -(defun ada-capitalize-word (&optional arg) +(defun ada-capitalize-word (&optional _arg) "Upcase first letter and letters following '_', lower case other letters. ARG is ignored, and is there for compatibility with `capitalize-word' only." (interactive) @@ -4219,7 +4219,7 @@ ((eq ada-tab-policy 'always-tab) (error "Not implemented")) )) -(defun ada-untab (arg) +(defun ada-untab (_arg) "Delete leading indenting according to `ada-tab-policy'." ;; FIXME: ARG is ignored (interactive "P") @@ -5250,7 +5250,7 @@ ;; Support for narrow-to-region ;; --------------------------------------------------------- -(defun ada-narrow-to-defun (&optional arg) +(defun ada-narrow-to-defun (&optional _arg) "Make text outside current subprogram invisible. The subprogram visible is the one that contains or follow point. Optional ARG is ignored. === modified file 'lisp/progmodes/ada-prj.el' --- lisp/progmodes/ada-prj.el 2011-03-05 21:56:00 +0000 +++ lisp/progmodes/ada-prj.el 2011-04-22 18:44:26 +0000 @@ -92,7 +92,7 @@ (ada-customize) (ada-prj-new))) -(defun ada-prj-initialize-values (symbol ada-buffer filename) +(defun ada-prj-initialize-values (symbol _ada-buffer filename) "Set SYMBOL to the property list of the project file FILENAME. If FILENAME is null, read the file associated with ADA-BUFFER. If no project file is found, return the default values." @@ -257,19 +257,19 @@ (widget-insert "\n Project configuration.\n ___________ ____________ ____________ ____________ ____________\n / ") (widget-create 'push-button :notify - (lambda (&rest dummy) (ada-prj-display-page 1)) "General") + (lambda (&rest _dummy) (ada-prj-display-page 1)) "General") (widget-insert " \\ / ") (widget-create 'push-button :notify - (lambda (&rest dummy) (ada-prj-display-page 2)) "Paths") + (lambda (&rest _dummy) (ada-prj-display-page 2)) "Paths") (widget-insert " \\ / ") (widget-create 'push-button :notify - (lambda (&rest dummy) (ada-prj-display-page 3)) "Switches") - (widget-insert " \\ / ") - (widget-create 'push-button :notify - (lambda (&rest dummy) (ada-prj-display-page 4)) "Ada Menu") - (widget-insert " \\ / ") - (widget-create 'push-button :notify - (lambda (&rest dummy) (ada-prj-display-page 5)) "Debugger") + (lambda (&rest _dummy) (ada-prj-display-page 3)) "Switches") + (widget-insert " \\ / ") + (widget-create 'push-button :notify + (lambda (&rest _dummy) (ada-prj-display-page 4)) "Ada Menu") + (widget-insert " \\ / ") + (widget-create 'push-button :notify + (lambda (&rest _dummy) (ada-prj-display-page 5)) "Debugger") (widget-insert " \\\n") ;; Display the currently selected page @@ -458,15 +458,15 @@ (widget-insert "______________________________________________________________________\n\n ") (widget-create 'push-button - :notify (lambda (&rest ignore) + :notify (lambda (&rest _ignore) (setq ada-prj-current-values (ada-default-prj-properties)) (ada-prj-display-page 1)) "Reset to Default Values") (widget-insert " ") - (widget-create 'push-button :notify (lambda (&rest ignore) (kill-buffer nil)) + (widget-create 'push-button :notify (lambda (&rest _ignore) (kill-buffer nil)) "Cancel") (widget-insert " ") - (widget-create 'push-button :notify (lambda (&rest ignore) (ada-prj-save)) + (widget-create 'push-button :notify (lambda (&rest _ignore) (ada-prj-save)) "Save") (widget-insert "\n\n") @@ -546,7 +546,7 @@ ada-list "\n")) -(defun ada-prj-field-modified (widget &rest dummy) +(defun ada-prj-field-modified (widget &rest _dummy) "Callback for modification of WIDGET. Remaining args DUMMY are ignored. Save the change in `ada-prj-current-values' so that selecting @@ -556,7 +556,7 @@ (widget-get widget ':prj-field) (widget-value widget)))) -(defun ada-prj-display-help (widget widget-modified event) +(defun ada-prj-display-help (widget _widget-modified event) "Callback for help button in WIDGET. Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." (let ((text (widget-get widget 'prj-help))) @@ -572,7 +572,7 @@ (concat "*****Help*****\n" text "\n**************\n") (point-at-bol 2))))) -(defun ada-prj-show-value (widget widget-modified event) +(defun ada-prj-show-value (widget _widget-modified event) "Show the current field value in WIDGET. Parameters WIDGET-MODIFIED, EVENT match :notify for the widget." (let* ((field (widget-get widget ':prj-field)) === modified file 'lisp/progmodes/ada-xref.el' --- lisp/progmodes/ada-xref.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/ada-xref.el 2011-04-22 18:44:26 +0000 @@ -1043,7 +1043,7 @@ (setq old-contents (buffer-string)))) (let ((compilation-error "reference")) - (compilation-start command 'compilation-mode (lambda (mode) ada-gnatfind-buffer-name))) + (compilation-start command 'compilation-mode (lambda (_mode) ada-gnatfind-buffer-name))) ;; Hide the "Compilation" menu (with-current-buffer ada-gnatfind-buffer-name @@ -1384,7 +1384,7 @@ ;; Do not add -fullname, since we can have a 'rsh' command in front. ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef - (fset 'gud-gdb-massage-args (lambda (file args) args)) + (fset 'gud-gdb-massage-args (lambda (_file args) args)) (set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator)) (if (not (equal pre-cmd "")) === modified file 'lisp/progmodes/antlr-mode.el' --- lisp/progmodes/antlr-mode.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/antlr-mode.el 2011-04-22 18:44:26 +0000 @@ -82,7 +82,7 @@ ;;; Code: -(eval-when-compile +(eval-when-compile (require 'cl)) (require 'easymenu) @@ -93,7 +93,7 @@ (declare-function cond-emacs-xemacs-macfn "antlr-mode" (args &optional msg)) ;; General Emacs/XEmacs-compatibility compile-time macros -(eval-when-compile +(eval-when-compile (defmacro cond-emacs-xemacs (&rest args) (cond-emacs-xemacs-macfn args "`cond-emacs-xemacs' must return exactly one element")) @@ -1073,7 +1073,7 @@ (read-from-minibuffer prompt initial-input nil nil (or history 'shell-command-history))) -(defunx antlr-with-displaying-help-buffer (thunk &optional name) +(defunx antlr-with-displaying-help-buffer (thunk &optional _name) :xemacs-and-try with-displaying-help-buffer "Make a help buffer and call `thunk' there." (with-output-to-temp-buffer "*Help*" @@ -1092,7 +1092,7 @@ ;;;(defvar antlr-statistics-cache 0) ;;;(defvar antlr-statistics-inval 0) -(defunx antlr-invalidate-context-cache (&rest dummies) +(defunx antlr-invalidate-context-cache (&rest _dummies) ;; checkdoc-params: (dummies) "Invalidate context cache for syntactical context information." :XEMACS ; XEmacs bug workaround @@ -1670,7 +1670,7 @@ table))) (list level input (cdr kind)))))) -(defun antlr-options-menu-filter (level menu-items) +(defun antlr-options-menu-filter (level _menu-items) "Return items for options submenu of level LEVEL." ;; checkdoc-params: (menu-items) (let ((active (if buffer-read-only @@ -2072,7 +2072,7 @@ nil table '(("false") ("true")))) -(defun antlr-language-option-extra (phase &rest dummies) +(defun antlr-language-option-extra (phase &rest _dummies) ;; checkdoc-params: (dummies) "Change language according to the new value of the \"language\" option. Call `antlr-mode' if the new language would be different from the value @@ -2088,7 +2088,7 @@ (antlr-mode) (and font-lock (null font-lock-mode) (font-lock-mode 1))))))) -(defun antlr-c++-mode-extra (phase option &rest dummies) +(defun antlr-c++-mode-extra (phase option &rest _dummies) ;; checkdoc-params: (option dummies) "Warn if C++ option is used with the wrong language. Ask user \(\"y or n\"), if a C++ only option is going to be inserted but @@ -2260,7 +2260,7 @@ (or saved (save-some-buffers (not antlr-ask-about-save))) (let ((default-directory (file-name-directory file))) (compilation-start (concat command " " (file-name-nondirectory file)) - nil #'(lambda (mode-name) "*Antlr-Run*")))) + nil (lambda (_mode-name) "*Antlr-Run*")))) (defun antlr-run-tool-interactive () ;; code in `interactive' is not compiled @@ -2592,7 +2592,7 @@ ;; FIXME: Since it uses cc-mode, it bumps into c-update-modeline's ;; limitation to mode-name being a string. ;; '("Antlr." (:eval (cadr (assq antlr-language antlr-language-alist)))) - "Antlr" + "Antlr" "Major mode for editing ANTLR grammar files." :abbrev-table antlr-mode-abbrev-table (c-initialize-cc-mode) ; cc-mode is required === modified file 'lisp/progmodes/asm-mode.el' --- lisp/progmodes/asm-mode.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/asm-mode.el 2011-04-22 18:44:26 +0000 @@ -90,7 +90,7 @@ "Keymap for Asm mode.") (defconst asm-font-lock-keywords - (append + (append '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.\\sw+\\)*\\)?" (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t)) ;; label started from ".". === modified file 'lisp/progmodes/bug-reference.el' --- lisp/progmodes/bug-reference.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/bug-reference.el 2011-04-22 18:44:26 +0000 @@ -109,7 +109,7 @@ (funcall bug-reference-url-format)))))))))) ;; Taken from button.el. -(defun bug-reference-push-button (&optional pos use-mouse-action) +(defun bug-reference-push-button (&optional pos _use-mouse-action) "Open URL corresponding to the bug reference at POS." (interactive (list (if (integerp last-command-event) (point) last-command-event))) === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-03-12 04:29:22 +0000 +++ lisp/progmodes/compile.el 2011-04-22 18:44:26 +0000 @@ -833,7 +833,7 @@ POS and RES.") (make-variable-buffer-local 'compilation--previous-directory-cache) -(defun compilation--flush-directory-cache (start end) +(defun compilation--flush-directory-cache (start _end) (cond ((or (not compilation--previous-directory-cache) (<= (car compilation--previous-directory-cache) start))) @@ -1307,7 +1307,7 @@ (compilation--parse-region (point) compilation--parsed))))) nil) -(defun compilation--flush-parse (start end) +(defun compilation--flush-parse (start _end) "Mark the region between START and END for re-parsing." (if (markerp compilation--parsed) (move-marker compilation--parsed (min start compilation--parsed)))) @@ -1399,31 +1399,31 @@ :group 'compilation) -(defun compilation-buffer-name (mode-name mode-command name-function) +(defun compilation-buffer-name (name-of-mode mode-command name-function) "Return the name of a compilation buffer to use. -If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME +If NAME-FUNCTION is non-nil, call it with one argument NAME-OF-MODE to determine the buffer name. Likewise if `compilation-buffer-name-function' is non-nil. If current buffer has the major mode MODE-COMMAND, return the name of the current buffer, so that it gets reused. -Otherwise, construct a buffer name from MODE-NAME." +Otherwise, construct a buffer name from NAME-OF-MODE." (cond (name-function - (funcall name-function mode-name)) + (funcall name-function name-of-mode)) (compilation-buffer-name-function - (funcall compilation-buffer-name-function mode-name)) + (funcall compilation-buffer-name-function name-of-mode)) ((eq mode-command major-mode) (buffer-name)) (t - (concat "*" (downcase mode-name) "*")))) + (concat "*" (downcase name-of-mode) "*")))) ;; This is a rough emulation of the old hack, until the transition to new ;; compile is complete. (defun compile-internal (command error-message - &optional name-of-mode parser + &optional _name-of-mode parser error-regexp-alist name-function - enter-regexp-alist leave-regexp-alist - file-regexp-alist nomessage-regexp-alist - no-async highlight-regexp local-map) + _enter-regexp-alist _leave-regexp-alist + file-regexp-alist _nomessage-regexp-alist + _no-async highlight-regexp _local-map) (if parser (error "Compile now works very differently, see `compilation-error-regexp-alist'")) (let ((compilation-error-regexp-alist @@ -2229,7 +2229,7 @@ (when reset (setq compilation-current-error nil)) (let* ((columns compilation-error-screen-columns) ; buffer's local value - (last 1) timestamp + (last 1) (msg (compilation-next-error (or n 1) nil (or compilation-current-error compilation-messages-start === modified file 'lisp/progmodes/cpp.el' --- lisp/progmodes/cpp.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/cpp.el 2011-04-22 18:44:26 +0000 @@ -308,7 +308,6 @@ ;; Pop top of cpp-state-stack and create overlay. (let ((entry (assoc (nth 1 (car cpp-state-stack)) cpp-edit-list)) (branch (nth 0 (car cpp-state-stack))) - (begin (nth 2 (car cpp-state-stack))) (end (nth 3 (car cpp-state-stack)))) (setq cpp-state-stack (cdr cpp-state-stack)) (if entry @@ -398,7 +397,7 @@ (overlay-put overlay 'insert-in-front-hooks '(cpp-grow-overlay)) (overlay-put overlay 'insert-behind-hooks '(cpp-grow-overlay))) -(defun cpp-signal-read-only (overlay after start end &optional len) +(defun cpp-signal-read-only (overlay after start end &optional _len) ;; Only allow deleting the whole overlay. ;; Trying to change a read-only overlay. (if (and (not after) @@ -406,7 +405,7 @@ (> (overlay-end overlay) end))) (error "This text is read only"))) -(defun cpp-grow-overlay (overlay after start end &optional len) +(defun cpp-grow-overlay (overlay after start end &optional _len) ;; Make OVERLAY grow to contain range START to END. (if after (move-overlay overlay === modified file 'lisp/progmodes/dcl-mode.el' --- lisp/progmodes/dcl-mode.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/dcl-mode.el 2011-04-22 18:44:26 +0000 @@ -662,8 +662,7 @@ (defun dcl-end-of-command () "Move point to end of current command or next command if not on a command." (interactive) - (let ((type (dcl-get-line-type)) - (start (point))) + (let ((type (dcl-get-line-type))) (if (or (eq type '$) (eq type '-)) (progn @@ -941,7 +940,7 @@ ;;;--------------------------------------------------------------------------- (defun dcl-calc-command-indent-multiple - (indent-type cur-indent extra-indent last-point this-point) + (indent-type cur-indent extra-indent _last-point _this-point) "Indent lines to a multiple of dcl-basic-offset. Set dcl-calc-command-indent-function to this function to customize @@ -1185,7 +1184,7 @@ ;;;--------------------------------------------------------------------------- -(defun dcl-calc-cont-indent-relative (cur-indent extra-indent) +(defun dcl-calc-cont-indent-relative (_cur-indent _extra-indent) "Indent continuation lines to align with words on previous line. Indent continuation lines to a position relative to preceding @@ -1540,7 +1539,7 @@ ;;;------------------------------------------------------------------------- -(defun dcl-option-value-basic (option-assoc) +(defun dcl-option-value-basic (_option-assoc) "Guess a value for basic-offset." (save-excursion (dcl-beginning-of-command) @@ -1575,7 +1574,7 @@ ;;;------------------------------------------------------------------------- -(defun dcl-option-value-offset (option-assoc) +(defun dcl-option-value-offset (_option-assoc) "Guess a value for an offset. Find the column of the first non-blank character on the line. Returns the column offset." @@ -1586,7 +1585,7 @@ ;;;------------------------------------------------------------------------- -(defun dcl-option-value-margin-offset (option-assoc) +(defun dcl-option-value-margin-offset (_option-assoc) "Guess a value for margin offset. Find the column of the first non-blank character on the line, not counting labels. @@ -1598,7 +1597,7 @@ ;;;------------------------------------------------------------------------- -(defun dcl-option-value-comment-line (option-assoc) +(defun dcl-option-value-comment-line (_option-assoc) "Guess a value for `dcl-comment-line-regexp'. Must return a string." ;; Should we set comment-start and comment-start-skip as well? @@ -1789,8 +1788,7 @@ (if (eolp) (error "Missing colon in local variables entry")) (skip-chars-backward " \t") (let* ((str (buffer-substring beg (point))) - (found-var (read str)) - val) + (found-var (read str))) ;; Setting variable named "end" means end of list. (if (string-equal (downcase str) "end") (progn @@ -1895,6 +1893,10 @@ ;;;------------------------------------------------------------------------- +(with-no-warnings + ;; Dynamically bound in `dcl-save-mode'. + (defvar mode)) + (defun dcl-save-mode () "Save the current mode for this buffer. Save the current mode in a `Local Variables:' @@ -1902,7 +1904,7 @@ (interactive) (let ((mode (prin1-to-string major-mode))) (if (string-match "-mode$" mode) - (let ((mode (intern (substring mode 0 (match-beginning 0))))) + (let ((mode (intern (substring mode 0 (match-beginning 0))))) (dcl-save-option 'mode)) (message "Strange mode: %s" mode)))) === modified file 'lisp/progmodes/delphi.el' --- lisp/progmodes/delphi.el 2011-03-16 01:28:20 +0000 +++ lisp/progmodes/delphi.el 2011-04-22 18:44:26 +0000 @@ -328,7 +328,7 @@ (after-change-functions nil) (modified (buffer-modified-p))) ;; Disable any queries about editing obsolete files. - (fset 'ask-user-about-supersession-threat (lambda (fn))) + (fset 'ask-user-about-supersession-threat (lambda (_fn))) (unwind-protect (progn ,@forms) (set-buffer-modified-p modified) @@ -444,6 +444,12 @@ (goto-char curr-point) next)) +(defvar delphi-ignore-changes t + "Internal flag to control if the Delphi mode responds to buffer changes. +Defaults to t in case the `delphi-after-change' function is called on a +non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: + (let ((delphi-ignore-changes t)) ...)") + (defun delphi-set-text-properties (from to properties) ;; Like `set-text-properties', except we do not consider this to be a buffer ;; modification. @@ -590,7 +596,6 @@ ;; character set. (let ((currp (point)) (end nil) - (start nil) (token nil)) (goto-char p) (when (> (skip-chars-forward charset) 0) @@ -720,13 +725,7 @@ (delphi-step-progress p "Fontifying" delphi-fontifying-progress-step)) (delphi-progress-done))))) -(defvar delphi-ignore-changes t - "Internal flag to control if the Delphi mode responds to buffer changes. -Defaults to t in case the `delphi-after-change' function is called on a -non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: - (let ((delphi-ignore-changes t)) ...)") - -(defun delphi-after-change (change-start change-end old-length) +(defun delphi-after-change (change-start change-end _old-length) ;; Called when the buffer has changed. Reparses the changed region. (unless delphi-ignore-changes (let ((delphi-ignore-changes t)) ; Prevent recursive calls. @@ -922,8 +921,7 @@ ;; Returns the token of the if or case statement. (let ((token (delphi-previous-token from-else)) (token-kind nil) - (semicolon-count 0) - (if-count 0)) + (semicolon-count 0)) (catch 'done (while token (setq token-kind (delphi-token-kind token)) @@ -971,8 +969,7 @@ comment ;; Scan until we run out of // comments. (let ((prev-comment comment) - (start-comment comment) - (kind nil)) + (start-comment comment)) (while (let ((kind (delphi-token-kind prev-comment))) (cond ((eq kind 'space)) ((eq kind 'comment-single-line) @@ -989,8 +986,7 @@ comment ;; Scan until we run out of // comments. (let ((next-comment comment) - (end-comment comment) - (kind nil)) + (end-comment comment)) (while (let ((kind (delphi-token-kind next-comment))) (cond ((eq kind 'space)) ((eq kind 'comment-single-line) @@ -1527,7 +1523,6 @@ (interactive) (delphi-save-match-data (let ((marked-point (point-marker)) ; Maintain our position reliably. - (new-point nil) (line-start nil) (old-indent 0) (new-indent 0)) === modified file 'lisp/progmodes/ebrowse.el' --- lisp/progmodes/ebrowse.el 2011-03-15 17:39:56 +0000 +++ lisp/progmodes/ebrowse.el 2011-04-22 18:44:26 +0000 @@ -736,7 +736,7 @@ "Return a list containing all files mentioned in a tree. MARKED-ONLY non-nil means include marked classes only." (let (list) - (maphash #'(lambda (file dummy) (setq list (cons file list))) + (maphash (lambda (file _dummy) (setq list (cons file list))) (ebrowse-files-table marked-only)) list)) @@ -784,9 +784,9 @@ (defun ebrowse-sort-tree-list (list) "Sort a LIST of `ebrowse-ts' structures by qualified class names." (sort list - #'(lambda (a b) - (string< (ebrowse-qualified-class-name (ebrowse-ts-class a)) - (ebrowse-qualified-class-name (ebrowse-ts-class b)))))) + (lambda (a b) + (string< (ebrowse-qualified-class-name (ebrowse-ts-class a)) + (ebrowse-qualified-class-name (ebrowse-ts-class b)))))) (defun ebrowse-class-in-tree (class tree) @@ -923,7 +923,7 @@ (list header tree))) -(defun ebrowse-revert-tree-buffer-from-file (ignore-auto-save noconfirm) +(defun ebrowse-revert-tree-buffer-from-file (_ignore-auto-save noconfirm) "Function installed as `revert-buffer-function' in tree buffers. See that variable's documentation for the meaning of IGNORE-AUTO-SAVE and NOCONFIRM." @@ -937,11 +937,11 @@ (current-buffer))) -(defun ebrowse-create-tree-buffer (tree tags-file header obarray pop) +(defun ebrowse-create-tree-buffer (tree tags-file header classes pop) "Create a new tree buffer for tree TREE. The tree was loaded from file TAGS-FILE. HEADER is the header structure of the file. -OBARRAY is an obarray with a symbol for each class in the tree. +CLASSES is an obarray with a symbol for each class in the tree. POP non-nil means popup the buffer up at the end. Return the buffer created." (let ((name ebrowse-tree-buffer-name)) @@ -949,7 +949,7 @@ (ebrowse-tree-mode) (setq ebrowse--tree tree ebrowse--tags-file-name tags-file - ebrowse--tree-obarray obarray + ebrowse--tree-obarray classes ebrowse--header header ebrowse--frozen-flag nil) (ebrowse-redraw-tree) @@ -1215,17 +1215,16 @@ "Toggle mark for class cursor is on. If given a numeric N-TIMES argument, mark that many classes." (interactive "p") - (let (to-change pnt) + (let (to-change) ;; Get the classes whose mark must be toggled. Note that ;; ebrowse-tree-at-point might issue an error. - (condition-case error - (loop repeat (or n-times 1) - as tree = (ebrowse-tree-at-point) - do (progn - (setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree))) - (forward-line 1) - (push tree to-change))) - (error nil)) + (ignore-errors + (loop repeat (or n-times 1) + as tree = (ebrowse-tree-at-point) + do (progn + (setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree))) + (forward-line 1) + (push tree to-change)))) (save-excursion ;; For all these classes, reverse the mark char in the display ;; by a regexp replace over the whole buffer. The reason for this @@ -1376,9 +1375,9 @@ (defun ebrowse-same-tree-member-buffer-list () "Return a list of members buffers with same tree as current buffer." (ebrowse-delete-if-not - #'(lambda (buffer) - (eq (ebrowse-value-in-buffer 'ebrowse--tree buffer) - ebrowse--tree)) + (lambda (buffer) + (eq (ebrowse-value-in-buffer 'ebrowse--tree buffer) + ebrowse--tree)) (ebrowse-member-buffer-list))) @@ -1417,9 +1416,9 @@ when (eq class tree) do (kill-buffer buffer))) -(defun ebrowse-frozen-tree-buffer-name (tags-file-name) - "Return the buffer name of a tree which is associated TAGS-FILE-NAME." - (concat ebrowse-tree-buffer-name " (" tags-file-name ")")) +(defun ebrowse-frozen-tree-buffer-name (tags-file) + "Return the buffer name of a tree which is associated TAGS-FILE." + (concat ebrowse-tree-buffer-name " (" tags-file ")")) (defun ebrowse-pop-to-browser-buffer (arg) @@ -1545,41 +1544,41 @@ where))) -(defun ebrowse-find-class-declaration (prefix-arg) +(defun ebrowse-find-class-declaration (prefix) "Find a class declaration and position cursor on it. -PREFIX-ARG 4 means find it in another window. -PREFIX-ARG 5 means find it in another frame." +PREFIX 4 means find it in another window. +PREFIX 5 means find it in another frame." (interactive "p") (ebrowse-view/find-class-declaration :view nil - :where (cond ((= prefix-arg 4) 'other-window) - ((= prefix-arg 5) 'other-frame) - (t 'this-window)))) - - -(defun ebrowse-view-class-declaration (prefix-arg) + :where (cond ((= prefix 4) 'other-window) + ((= prefix 5) 'other-frame) + (t 'this-window)))) + + +(defun ebrowse-view-class-declaration (prefix) "View class declaration and position cursor on it. -PREFIX-ARG 4 means view it in another window. -PREFIX-ARG 5 means view it in another frame." +PREFIX 4 means view it in another window. +PREFIX 5 means view it in another frame." (interactive "p") (ebrowse-view/find-class-declaration :view 'view - :where (cond ((= prefix-arg 4) 'other-window) - ((= prefix-arg 5) 'other-frame) - (t 'this-window)))) + :where (cond ((= prefix 4) 'other-window) + ((= prefix 5) 'other-frame) + (t 'this-window)))) ;;; The FIND engine -(defun ebrowse-find-source-file (file tags-file-name) +(defun ebrowse-find-source-file (file tags-file) "Find source file FILE. -Source files are searched for (a) relative to TAGS-FILE-NAME +Source files are searched for (a) relative to TAGS-FILE which is the path of the BROWSE file from which the class tree was loaded, and (b) in the directories named in `ebrowse-search-path'." (let (file-name (try-file (expand-file-name file - (file-name-directory tags-file-name)))) + (file-name-directory tags-file)))) (if (file-readable-p try-file) (setq file-name try-file) (let ((search-in ebrowse-search-path)) @@ -1629,7 +1628,7 @@ 'ebrowse-view-exit-fn))) (defun ebrowse-view/find-file-and-search-pattern - (struc info file tags-file-name &optional view where) + (struc info file tags-file &optional view where) "Find or view a member or class. STRUC is an `ebrowse-bs' structure (or a structure including that) describing what to search. @@ -1641,7 +1640,7 @@ FILE is the file to search the member in. FILE is not taken out of STRUC here because the filename in STRUC may be nil in which case the filename of the class description is used. -TAGS-FILE-NAME is the name of the BROWSE file from which the +TAGS-FILE is the name of the BROWSE file from which the tree was loaded. If VIEW is non-nil, view file else find the file. WHERE is either `other-window', `other-frame' or `this-window' and @@ -1650,7 +1649,7 @@ (error "Sorry, no file information available for %s" (ebrowse-bs-name struc))) ;; Get the source file to view or find. - (setf file (ebrowse-find-source-file file tags-file-name)) + (setf file (ebrowse-find-source-file file tags-file)) ;; If current window is dedicated, use another frame. (when (window-dedicated-p (selected-window)) (setf where 'other-window)) @@ -2538,7 +2537,7 @@ (defun* ebrowse-view/find-member-declaration/definition - (prefix view &optional definition info header tags-file-name) + (prefix view &optional definition info header tags-file) "Find or view a member declaration or definition. With PREFIX 4. find file in another window, with prefix 5 find file in another frame. @@ -2546,11 +2545,11 @@ declaration. INFO is a list (TREE ACCESSOR MEMBER) describing the member to search. -TAGS-FILE-NAME is the file name of the BROWSE file." +TAGS-FILE is the file name of the BROWSE file." (unless header (setq header ebrowse--header)) - (unless tags-file-name - (setq tags-file-name ebrowse--tags-file-name)) + (unless tags-file + (setq tags-file ebrowse--tags-file-name)) (let (tree member accessor file on-class (where (if (= prefix 4) 'other-window (if (= prefix 5) 'other-frame 'this-window)))) @@ -2570,7 +2569,7 @@ (ebrowse-ts-class tree) (list ebrowse--header (ebrowse-ts-class tree) nil) (ebrowse-cs-file (ebrowse-ts-class tree)) - tags-file-name view where))) + tags-file view where))) ;; For some member lists, it doesn't make sense to search for ;; a definition. If this is requested, silently search for the ;; declaration. @@ -2607,7 +2606,7 @@ (message nil) ;; Recurse with new info. (ebrowse-view/find-member-declaration/definition - prefix view (not definition) info header tags-file-name)) + prefix view (not definition) info header tags-file)) (error "Search canceled")) ;; Find that thing. (ebrowse-view/find-file-and-search-pattern @@ -2618,7 +2617,7 @@ :point (ebrowse-ms-point member)) (list header member accessor) file - tags-file-name + tags-file view where)))) @@ -2677,7 +2676,7 @@ means the member buffer is standalone. CLASS is its class." (let* ((classes ebrowse--tree-obarray) (tree ebrowse--tree) - (tags-file-name ebrowse--tags-file-name) + (tags-file ebrowse--tags-file-name) (header ebrowse--header) temp-buffer-setup-hook (temp-buffer (get-buffer ebrowse-member-buffer-name))) @@ -2697,7 +2696,7 @@ ebrowse--accessor list ebrowse--tree-obarray classes ebrowse--frozen-flag stand-alone - ebrowse--tags-file-name tags-file-name + ebrowse--tags-file-name tags-file ebrowse--header header ebrowse--tree tree buffer-read-only t) @@ -2849,7 +2848,7 @@ ;;; Switching member buffer to display a selected member -(defun ebrowse-goto-visible-member/all-member-lists (prefix) +(defun ebrowse-goto-visible-member/all-member-lists (_prefix) "Position cursor on a member read from the minibuffer. With PREFIX, search all members in the tree. Otherwise consider only members visible in the buffer." @@ -3279,7 +3278,7 @@ Prompt with PROMPT. Insert into the minibuffer a C++ identifier read from point as default. Value is a list (CLASS-NAME MEMBER-NAME)." (save-excursion - (let* (start member-info (members (ebrowse-member-table header))) + (let ((members (ebrowse-member-table header))) (multiple-value-bind (class-name member-name) (values-list (ebrowse-tags-read-member+class-name)) (unless member-name @@ -3290,7 +3289,7 @@ (completion-result (try-completion name members))) ;; Cannot rely on `try-completion' returning t for exact ;; matches! It returns the name as a string. - (unless (setq member-info (gethash name members)) + (unless (gethash name members) (if (y-or-n-p "No exact match found. Try substrings? ") (setq name (or (first (ebrowse-list-of-matching-members @@ -3316,7 +3315,7 @@ (list class name)))) -(defun ebrowse-tags-choose-class (tree header name initial-class-name) +(defun ebrowse-tags-choose-class (_tree header name initial-class-name) "Read a class name for a member from the minibuffer. TREE is the class tree we operate on. HEADER is its header structure. @@ -3354,7 +3353,7 @@ info) (unless name (multiple-value-setq (class-name name) - (values-list + (values-list (ebrowse-tags-read-name header (concat (if view "View" "Find") " member " @@ -3481,7 +3480,7 @@ (let* ((marker (point-marker)) class-name (name fix-name) info) (unless name (multiple-value-setq (class-name name) - (values-list + (values-list (ebrowse-tags-read-name header (concat "Find member list of: "))))) (setq info (ebrowse-tags-choose-class tree header name class-name)) @@ -3495,10 +3494,10 @@ are not performed." (let (list) (when (or name regexp) - (maphash #'(lambda (member-name info) - (when (or (and name (string= name member-name)) - (and regexp (string-match regexp member-name))) - (setq list (cons member-name list)))) + (maphash (lambda (member-name _info) + (when (or (and name (string= name member-name)) + (and regexp (string-match regexp member-name))) + (setq list (cons member-name list)))) members)) list)) @@ -3535,18 +3534,18 @@ (with-output-to-temp-buffer (concat "*Members in file " file "*") (set-buffer standard-output) (maphash - #'(lambda (member-name list) - (loop for info in list - as member = (third info) - as class = (ebrowse-ts-class (first info)) - when (or (and (null (ebrowse-ms-file member)) - (string= (ebrowse-cs-file class) file)) - (string= file (ebrowse-ms-file member))) - do (ebrowse-draw-file-member-info info "decl.") - when (or (and (null (ebrowse-ms-definition-file member)) - (string= (ebrowse-cs-source-file class) file)) - (string= file (ebrowse-ms-definition-file member))) - do (ebrowse-draw-file-member-info info "defn."))) + (lambda (_member-name list) + (loop for info in list + as member = (third info) + as class = (ebrowse-ts-class (first info)) + when (or (and (null (ebrowse-ms-file member)) + (string= (ebrowse-cs-file class) file)) + (string= file (ebrowse-ms-file member))) + do (ebrowse-draw-file-member-info info "decl.") + when (or (and (null (ebrowse-ms-definition-file member)) + (string= (ebrowse-cs-source-file class) file)) + (string= file (ebrowse-ms-definition-file member))) + do (ebrowse-draw-file-member-info info "defn."))) members)))) === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/etags.el 2011-04-22 18:44:26 +0000 @@ -263,7 +263,7 @@ (defun initialize-new-tags-table () "Initialize the tags table in the current buffer. Return non-nil if it is a valid tags table, and -in that case, also make the tags table state variables +in that case, also make the tags table state variables buffer-local and set them to nil." (set (make-local-variable 'tags-table-files) nil) (set (make-local-variable 'tags-completion-table) nil) @@ -853,6 +853,7 @@ ;; Dynamic bondage: (defvar etags-case-fold-search) (defvar etags-syntax-table) +(defvar local-find-tag-hook) ;;;###autoload (defun find-tag-noselect (tagname &optional next-p regexp-p) @@ -1656,7 +1657,7 @@ ;; partial file name match, i.e. searched tag must match a substring ;; of the file name (potentially including a directory separator). -(defun tag-partial-file-name-match-p (tag) +(defun tag-partial-file-name-match-p (_tag) "Return non-nil if current tag matches file name. This is a substring match, and it can include directory separators. Point should be just after a string that matches TAG." @@ -1666,7 +1667,7 @@ (looking-at "\f\n")))) ;; t if point is in a tag line with a tag containing TAG as a substring. -(defun tag-any-match-p (tag) +(defun tag-any-match-p (_tag) "Return non-nil if current tag line contains TAG as a substring." (looking-at ".*\177")) @@ -1906,7 +1907,7 @@ (try-completion string (tags-table-files) predicate)))) ;;;###autoload -(defun list-tags (file &optional next-match) +(defun list-tags (file &optional _next-match) "Display list of tags in file FILE. This searches only the first table in the list, and no included tables. FILE should be as it appeared in the `etags' command, usually without a === modified file 'lisp/progmodes/executable.el' --- lisp/progmodes/executable.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/executable.el 2011-04-22 18:44:26 +0000 @@ -173,6 +173,8 @@ (file-modes buffer-file-name))))))) +(defvar compilation-error-regexp-alist) ; from compile.el + ;;;###autoload (defun executable-interpret (command) "Run script with user-specified args, and collect output in a buffer. @@ -186,7 +188,7 @@ (save-some-buffers (not compilation-ask-about-save)) (set (make-local-variable 'executable-command) command) (let ((compilation-error-regexp-alist executable-error-regexp-alist)) - (compilation-start command t (lambda (x) "*interpretation*")))) + (compilation-start command t (lambda (_x) "*interpretation*")))) === modified file 'lisp/progmodes/flymake.el' --- lisp/progmodes/flymake.el 2011-04-20 18:08:21 +0000 +++ lisp/progmodes/flymake.el 2011-04-22 18:44:26 +0000 @@ -596,7 +596,7 @@ (with-current-buffer source-buffer (flymake-parse-output-and-residual output))))) -(defun flymake-process-sentinel (process event) +(defun flymake-process-sentinel (process _event) "Sentinel for syntax check buffers." (when (memq (process-status process) '(signal exit)) (let* ((exit-status (process-exit-status process)) @@ -1110,7 +1110,7 @@ (flymake-log 1 "deleted file %s" file-name))) (defun flymake-safe-delete-directory (dir-name) - (condition-case err + (condition-case nil (progn (delete-directory dir-name) (flymake-log 1 "deleted dir %s" dir-name)) @@ -1386,7 +1386,7 @@ :group 'flymake :type 'boolean) -(defun flymake-after-change-function (start stop len) +(defun flymake-after-change-function (start stop _len) "Start syntax check for current buffer if it isn't already running." ;;+(flymake-log 0 "setting change time to %s" (flymake-float-time)) (let((new-text (buffer-substring start stop))) @@ -1496,7 +1496,7 @@ (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) temp-name)) -(defun flymake-create-temp-with-folder-structure (file-name prefix) +(defun flymake-create-temp-with-folder-structure (file-name _prefix) (unless (stringp file-name) (error "Invalid file-name")) @@ -1763,7 +1763,7 @@ (when temp-master-file-name (flymake-get-tex-args temp-master-file-name)))) -(defun flymake-get-include-dirs-dot (base-dir) +(defun flymake-get-include-dirs-dot (_base-dir) '(".")) ;;;; xml-specific init-cleanup routines === modified file 'lisp/progmodes/fortran.el' --- lisp/progmodes/fortran.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/fortran.el 2011-04-22 18:44:26 +0000 @@ -291,7 +291,7 @@ :type 'integer :safe 'integerp :initialize 'custom-initialize-default - :set (lambda (symbol value) + :set (lambda (_symbol value) ;; Do all fortran buffers, and the default. (fortran-line-length value t)) :version "23.1" === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-03-23 02:50:28 +0000 +++ lisp/progmodes/gdb-mi.el 2011-04-22 18:44:26 +0000 @@ -104,6 +104,13 @@ (require 'bindat) (eval-when-compile (require 'cl)) +(declare-function speedbar-change-initial-expansion-list "speedbar" (new-default)) +(declare-function speedbar-timer-fn "speedbar" ()) +(declare-function speedbar-line-text "speedbar" (&optional p)) +(declare-function speedbar-change-expand-button-char "speedbar" (char)) +(declare-function speedbar-delete-subblock "speedbar" (indent)) +(declare-function speedbar-center-buffer-smartly "speedbar" ()) + (defvar tool-bar-map) (defvar speedbar-initial-expansion-list-name) (defvar speedbar-frame) @@ -544,7 +551,7 @@ (defun gdb-find-watch-expression () (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)) - (varnum (car var)) expr array) + (varnum (car var)) expr) (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varnum) (let ((var1 (assoc (match-string 1 varnum) gdb-var-list)) var2 varnumlet (component-list (split-string (match-string 2 varnum) "\\." t))) @@ -1151,7 +1158,7 @@ (gdb-input (list (concat "-var-delete -c " varnum) 'ignore))) -(defun gdb-edit-value (text token indent) +(defun gdb-edit-value (_text _token _indent) "Assign a value to a variable displayed in the speedbar." (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) (varnum (car var)) (value)) @@ -1820,7 +1827,7 @@ ;; Start accumulating output for the GUD buffer (setq gdb-filter-output "") - (let ((output-record) (output-record-list)) + (let (output-record-list) ;; Process all the complete markers in this chunk. (dolist (gdbmi-record gdbmi-record-list) @@ -1860,17 +1867,17 @@ gdb-filter-output)) -(defun gdb-gdb (output-field)) +(defun gdb-gdb (_output-field)) (defun gdb-shell (output-field) (let ((gdb-output-sink gdb-output-sink)) (setq gdb-filter-output (concat output-field gdb-filter-output)))) -(defun gdb-ignored-notification (output-field)) +(defun gdb-ignored-notification (_output-field)) ;; gdb-invalidate-threads is defined to accept 'update-threads signal -(defun gdb-thread-created (output-field)) +(defun gdb-thread-created (_output-field)) (defun gdb-thread-exited (output-field) "Handle =thread-exited async record: unset `gdb-thread-number' if current thread exited and update threads list." @@ -1918,7 +1925,7 @@ (setq gdb-active-process t) (gdb-emit-signal gdb-buf-publisher 'update-threads)) -(defun gdb-starting (output-field) +(defun gdb-starting (_output-field) ;; CLI commands don't emit ^running at the moment so use gdb-running too. (setq gdb-inferior-status "running") (gdb-force-mode-line-update @@ -2219,8 +2226,7 @@ (defun gdb-table-string (table &optional sep) "Return TABLE as a string with columns separated with SEP." - (let ((column-sizes (gdb-table-column-sizes table)) - (res "")) + (let ((column-sizes (gdb-table-column-sizes table))) (mapconcat 'identity (gdb-mapcar* @@ -2375,38 +2381,37 @@ ;; Put breakpoint icons in relevant margins (even those set in the GUD buffer). (defun gdb-place-breakpoints () - (let ((flag) (bptno)) - ;; Remove all breakpoint-icons in source buffers but not assembler buffer. - (dolist (buffer (buffer-list)) - (with-current-buffer buffer - (if (and (eq gud-minor-mode 'gdbmi) - (not (string-match "\\` ?\\*.+\\*\\'" (buffer-name)))) - (gdb-remove-breakpoint-icons (point-min) (point-max))))) - (dolist (breakpoint gdb-breakpoints-list) - (let* ((breakpoint (cdr breakpoint)) ; gdb-breakpoints-list is - ; an associative list - (line (bindat-get-field breakpoint 'line))) - (when line - (let ((file (bindat-get-field breakpoint 'fullname)) - (flag (bindat-get-field breakpoint 'enabled)) - (bptno (bindat-get-field breakpoint 'number))) - (unless (file-exists-p file) - (setq file (cdr (assoc bptno gdb-location-alist)))) - (if (and file - (not (string-equal file "File not found"))) - (with-current-buffer - (find-file-noselect file 'nowarn) - (gdb-init-buffer) - ;; Only want one breakpoint icon at each location. - (gdb-put-breakpoint-icon (string-equal flag "y") bptno - (string-to-number line))) - (gdb-input - (list (concat "list " file ":1") - 'ignore)) - (gdb-input - (list "-file-list-exec-source-file" - `(lambda () (gdb-get-location - ,bptno ,line ,flag))))))))))) + ;; Remove all breakpoint-icons in source buffers but not assembler buffer. + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (if (and (eq gud-minor-mode 'gdbmi) + (not (string-match "\\` ?\\*.+\\*\\'" (buffer-name)))) + (gdb-remove-breakpoint-icons (point-min) (point-max))))) + (dolist (breakpoint gdb-breakpoints-list) + (let* ((breakpoint (cdr breakpoint)) ; gdb-breakpoints-list is + ; an associative list + (line (bindat-get-field breakpoint 'line))) + (when line + (let ((file (bindat-get-field breakpoint 'fullname)) + (flag (bindat-get-field breakpoint 'enabled)) + (bptno (bindat-get-field breakpoint 'number))) + (unless (file-exists-p file) + (setq file (cdr (assoc bptno gdb-location-alist)))) + (if (and file + (not (string-equal file "File not found"))) + (with-current-buffer + (find-file-noselect file 'nowarn) + (gdb-init-buffer) + ;; Only want one breakpoint icon at each location. + (gdb-put-breakpoint-icon (string-equal flag "y") bptno + (string-to-number line))) + (gdb-input + (list (concat "list " file ":1") + 'ignore)) + (gdb-input + (list "-file-list-exec-source-file" + `(lambda () (gdb-get-location + ,bptno ,line ,flag)))))))))) (defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") @@ -3276,7 +3281,6 @@ (defun gdb-disassembly-handler-custom () (let* ((instructions (bindat-get-field (gdb-json-partial-output) 'asm_insns)) (address (bindat-get-field (gdb-current-buffer-frame) 'addr)) - (pos 1) (table (make-gdb-table)) (marked-line nil)) (dolist (instr instructions) @@ -3806,8 +3810,7 @@ (let ((window (get-lru-window))) (if (eq (buffer-local-value 'gud-minor-mode (window-buffer window)) 'gdbmi) - (let* ((largest (get-largest-window)) - (cur-size (window-height largest))) + (let ((largest (get-largest-window))) (setq answer (split-window largest)) (set-window-buffer answer buf) (set-window-dedicated-p answer dedicated) === modified file 'lisp/progmodes/glasses.el' --- lisp/progmodes/glasses.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/glasses.el 2011-04-22 18:44:26 +0000 @@ -290,7 +290,7 @@ nil) -(defun glasses-change (beg end &optional old-len) +(defun glasses-change (beg end &optional _old-len) "After-change function updating glass overlays." (let ((beg-line (save-excursion (goto-char beg) (line-beginning-position))) (end-line (save-excursion (goto-char end) (line-end-position)))) === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2011-04-15 01:44:00 +0000 +++ lisp/progmodes/gud.el 2011-04-22 18:44:26 +0000 @@ -379,13 +379,13 @@ source file) or the source line number at the last break or step (if we're in the GUD buffer)." `(progn - (defun ,func (arg) + (defalias ',func (lambda (arg) ,@(if doc (list doc)) (interactive "p") (if (not gud-running) ,(if (stringp cmd) `(gud-call ,cmd arg) - cmd))) + cmd)))) ,(if key `(local-set-key ,(concat "\C-c" key) ',func)) ,(if key `(global-set-key (vconcat gud-key-prefix ,key) ',func)))) @@ -491,7 +491,7 @@ (gud-install-speedbar-variables) (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables)) -(defun gud-expansion-speedbar-buttons (directory zero) +(defun gud-expansion-speedbar-buttons (_directory _zero) "Wrapper for call to `speedbar-add-expansion-list'. DIRECTORY and ZERO are not used, but are required by the caller." (gud-speedbar-buttons gud-comint-buffer)) @@ -657,17 +657,15 @@ gud-marker-acc (substring gud-marker-acc (match-end 0)))) (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) - (let ((match (match-string 1 gud-marker-acc))) - - (setq - ;; Append any text before the marker to the output we're going - ;; to return - we don't include the marker in this text. - output (concat output - (substring gud-marker-acc 0 (match-beginning 0))) - - ;; Set the accumulator to the remaining text. - - gud-marker-acc (substring gud-marker-acc (match-end 0))))) + (setq + ;; Append any text before the marker to the output we're going + ;; to return - we don't include the marker in this text. + output (concat output + (substring gud-marker-acc 0 (match-beginning 0))) + + ;; Set the accumulator to the remaining text. + + gud-marker-acc (substring gud-marker-acc (match-end 0)))) ;; Does the remaining text look like it might end with the ;; beginning of another marker? If it does, then keep it in @@ -884,7 +882,7 @@ ;; gdb speedbar functions -(defun gud-gdb-goto-stackframe (text token indent) +(defun gud-gdb-goto-stackframe (_text token _indent) "Goto the stackframe described by TEXT, TOKEN, and INDENT." (speedbar-with-attached-buffer (gud-basic-call (concat "server frame " (nth 1 token))) @@ -1074,7 +1072,7 @@ directory)) :group 'gud) -(defun gud-dbx-massage-args (file args) +(defun gud-dbx-massage-args (_file args) (nconc (let ((directories gud-dbx-directories) (result nil)) (while directories @@ -1386,7 +1384,7 @@ directory)) :group 'gud) -(defun gud-xdb-massage-args (file args) +(defun gud-xdb-massage-args (_file args) (nconc (let ((directories gud-xdb-directories) (result nil)) (while directories @@ -1450,7 +1448,7 @@ ;; History of argument lists passed to perldb. (defvar gud-perldb-history nil) -(defun gud-perldb-massage-args (file args) +(defun gud-perldb-massage-args (_file args) "Convert a command line as would be typed normally to run perldb into one that invokes an Emacs-enabled debugging session. \"-emacs\" is inserted where it will be $ARGV[0] (see perl5db.pl)." @@ -2072,7 +2070,7 @@ ;; Change what was given in the minibuffer to something that can be used to ;; invoke the debugger. -(defun gud-jdb-massage-args (file args) +(defun gud-jdb-massage-args (_file args) ;; The jdb executable must have whitespace between "-classpath" and ;; its value while gud-common-init expects all switch values to ;; follow the switch keyword without intervening whitespace. We @@ -2151,7 +2149,7 @@ (setq cplist (cdr cplist))) (if found-file (concat (car cplist) "/" filename))))) -(defun gud-jdb-find-source (string) +(defun gud-jdb-find-source (_string) "Alias for function used to locate source files. Set to `gud-jdb-find-source-using-classpath' or `gud-jdb-find-source-file' during jdb initialization depending on the value of @@ -3047,7 +3045,7 @@ (declare-function syntax-symbol "gud" (x)) (declare-function syntax-point "gud" (x)) -(defun gud-find-class (f line) +(defun gud-find-class (f _line) "Find fully qualified class in file F at line LINE. This function uses the `gud-jdb-classpath' (and optional `gud-jdb-sourcepath') list(s) to derive a file @@ -3063,13 +3061,13 @@ (save-match-data (let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath)) (fbuffer (get-file-buffer f)) - syntax-symbol syntax-point class-found) + class-found + ;; Syntax-symbol returns the symbol of the *first* element + ;; in the syntactical analysis result list, syntax-point + ;; returns the buffer position of same + (syntax-symbol (lambda (x) (c-langelem-sym (car x)))) + (syntax-point (lambda (x) (c-langelem-pos (car x))))) (setq f (file-name-sans-extension (file-truename f))) - ;; Syntax-symbol returns the symbol of the *first* element - ;; in the syntactical analysis result list, syntax-point - ;; returns the buffer position of same - (fset 'syntax-symbol (lambda (x) (c-langelem-sym (car x)))) - (fset 'syntax-point (lambda (x) (c-langelem-pos (car x)))) ;; Search through classpath list for an entry that is ;; contained in f (while (and cplist (not class-found)) @@ -3092,17 +3090,17 @@ ;; with the 'topmost-intro symbol, there may be ;; nested classes... (while (not (eq 'topmost-intro - (syntax-symbol (c-guess-basic-syntax)))) + (funcall syntax-symbol (c-guess-basic-syntax)))) ;; Check if the current position c-syntactic ;; analysis has 'inclass (setq syntax (c-guess-basic-syntax)) (while - (and (not (eq 'inclass (syntax-symbol syntax))) + (and (not (eq 'inclass (funcall syntax-symbol syntax))) (cdr syntax)) (setq syntax (cdr syntax))) - (if (eq 'inclass (syntax-symbol syntax)) + (if (eq 'inclass (funcall syntax-symbol syntax)) (progn - (goto-char (syntax-point syntax)) + (goto-char (funcall syntax-point syntax)) ;; Now we're at the beginning of a class ;; definition. Find class name (looking-at @@ -3111,9 +3109,9 @@ (append (list (match-string-no-properties 1)) nclass))) (setq syntax (c-guess-basic-syntax)) - (while (and (not (syntax-point syntax)) (cdr syntax)) + (while (and (not (funcall syntax-point syntax)) (cdr syntax)) (setq syntax (cdr syntax))) - (goto-char (syntax-point syntax)) + (goto-char (funcall syntax-point syntax)) )) (string-match (concat (car nclass) "$") class-found) (setq class-found === modified file 'lisp/progmodes/hideif.el' --- lisp/progmodes/hideif.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/hideif.el 2011-04-22 18:44:26 +0000 @@ -412,13 +412,14 @@ "Pop the next token from token-list into the let variable \"hif-token\"." (setq hif-token (pop hif-token-list))) -(defun hif-parse-if-exp (hif-token-list) +(defun hif-parse-if-exp (token-list) "Parse the TOKEN-LIST. Return translated list in prefix form." - (hif-nexttoken) - (prog1 - (hif-expr) - (if hif-token ; is there still a token? - (error "Error: unexpected token: %s" hif-token)))) + (let ((hif-token-list token-list)) + (hif-nexttoken) + (prog1 + (hif-expr) + (if hif-token ; is there still a token? + (error "Error: unexpected token: %s" hif-token))))) (defun hif-expr () "Parse an expression as found in #if. @@ -507,7 +508,7 @@ ;; Unary plus/minus. ((memq hif-token '(hif-minus hif-plus)) (list (prog1 hif-token (hif-nexttoken)) 0 (hif-factor))) - + (t ; identifier (let ((ident hif-token)) (if (memq ident '(or and)) === modified file 'lisp/progmodes/hideshow.el' --- lisp/progmodes/hideshow.el 2011-02-19 22:20:35 +0000 +++ lisp/progmodes/hideshow.el 2011-04-22 18:44:26 +0000 @@ -565,10 +565,9 @@ (if comment-reg (hs-hide-comment-region (car comment-reg) (cadr comment-reg) end) (when (looking-at hs-block-start-regexp) - (let* ((mdata (match-data t)) - (header-beg (match-beginning 0)) - (header-end (match-end 0)) - p q ov) + (let ((mdata (match-data t)) + (header-end (match-end 0)) + p q ov) ;; `p' is the point at the end of the block beginning, which ;; may need to be adjusted (save-excursion === modified file 'lisp/progmodes/icon.el' --- lisp/progmodes/icon.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/icon.el 2011-04-22 18:44:26 +0000 @@ -484,9 +484,9 @@ (let ((indent-stack (list nil)) (contain-stack (list (point))) (case-fold-search nil) - restart outer-loop-done inner-loop-done state ostate - this-indent last-sexp last-depth - at-else at-brace at-do + outer-loop-done inner-loop-done state ostate + this-indent last-depth + at-else at-brace (opoint (point)) (next-depth 0)) (save-excursion @@ -506,9 +506,6 @@ (setq state (parse-partial-sexp (point) (progn (end-of-line) (point)) nil nil state)) (setq next-depth (car state)) - (if (and (car (cdr (cdr state))) - (>= (car (cdr (cdr state))) 0)) - (setq last-sexp (car (cdr (cdr state))))) (if (or (nth 4 ostate)) (icon-indent-line)) (if (or (nth 3 state)) @@ -518,8 +515,6 @@ (setq outer-loop-done t)) (if outer-loop-done nil - (if (/= last-depth next-depth) - (setq last-sexp nil)) (while (> last-depth next-depth) (setq indent-stack (cdr indent-stack) contain-stack (cdr contain-stack) === modified file 'lisp/progmodes/js.el' --- lisp/progmodes/js.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/js.el 2011-04-22 18:44:26 +0000 @@ -934,7 +934,7 @@ (setq beg (or beg (save-restriction (widen) (point-min)))) (setq js--cache-end (min js--cache-end beg))) -(defmacro js--debug (&rest arguments) +(defmacro js--debug (&rest _arguments) ;; `(message ,@arguments) ) @@ -1591,10 +1591,9 @@ (save-restriction (widen) (js--ensure-cache) - (let* ((bound (if (eobp) (point) (1+ (point)))) - (pstate (or (save-excursion - (js--backward-pstate)) - (list js--initial-pitem)))) + (let ((pstate (or (save-excursion + (js--backward-pstate)) + (list js--initial-pitem)))) ;; Loop until we either hit a pitem at BOB or pitem ends after ;; point (or at point if we're at eob) @@ -1921,7 +1920,7 @@ (let ((top-name (car name-parts)) (item-ptr items) - new-items last-new-item new-cons item) + new-items last-new-item new-cons) (js--debug "js--splice-into-items: name-parts: %S items:%S" name-parts @@ -2147,8 +2146,8 @@ . LOCATION), where SYMBOL-NAME is a string and LOCATION is a marker." (unless ido-mode - (ido-mode t) - (ido-mode nil)) + (ido-mode 1) + (ido-mode -1)) (let ((choice (ido-completing-read prompt @@ -2955,8 +2954,8 @@ ;; Prime IDO (unless ido-mode - (ido-mode t) - (ido-mode nil)) + (ido-mode 1) + (ido-mode -1)) (with-js (lexical-let ((tabs (js--get-tabs)) selected-tab-cname === modified file 'lisp/progmodes/make-mode.el' --- lisp/progmodes/make-mode.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/make-mode.el 2011-04-22 18:44:26 +0000 @@ -343,7 +343,7 @@ (defun makefile-make-font-lock-keywords (var keywords space &optional negation - &rest font-lock-keywords) + &rest fl-keywords) `(;; Do macro assignments. These get the "variable-name" face. (,makefile-macroassign-regex (1 font-lock-variable-name-face) @@ -393,7 +393,7 @@ ;; They can make a tab fail to be effective. ("^\\( +\\)\t" 1 makefile-space))) - ,@font-lock-keywords + ,@fl-keywords ;; Do dependencies. (makefile-match-dependency @@ -491,7 +491,7 @@ '("^[ \t]*\\.for[ \t].+[ \t]\\(in\\)\\>" 1 font-lock-keyword-face))) (defconst makefile-imake-font-lock-keywords - (append + (append (makefile-make-font-lock-keywords makefile-var-use-regex makefile-statements @@ -1155,7 +1155,6 @@ (let* ((beg (save-excursion (skip-chars-backward "^$(){}:#= \t\n") (point))) - (try (buffer-substring beg (point))) (paren nil) (do-macros (save-excursion @@ -1262,7 +1261,7 @@ ;; Filling -(defun makefile-fill-paragraph (arg) +(defun makefile-fill-paragraph (_arg) ;; Fill comments, backslashed lines, and variable definitions ;; specially. (save-excursion @@ -1680,7 +1679,7 @@ ;;; Utility functions ;;; ------------------------------------------------------------ -(defun makefile-match-function-end (end) +(defun makefile-match-function-end (_end) "To be called as an anchored matcher by font-lock. The anchor must have matched the opening parens in the first group." (let ((s (match-string-no-properties 1))) === modified file 'lisp/progmodes/octave-inf.el' --- lisp/progmodes/octave-inf.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/octave-inf.el 2011-04-22 18:44:26 +0000 @@ -268,8 +268,7 @@ (command (save-excursion (skip-syntax-backward "w_" (comint-line-beginning-position)) - (buffer-substring-no-properties (point) end))) - (proc (get-buffer-process inferior-octave-buffer))) + (buffer-substring-no-properties (point) end)))) (cond (inferior-octave-complete-impossible (error (concat "Your Octave does not have `completion_matches'. " @@ -336,7 +335,7 @@ the rest to `comint-output-filter'." (comint-output-filter proc (inferior-octave-strip-ctrl-g string))) -(defun inferior-octave-output-digest (proc string) +(defun inferior-octave-output-digest (_proc string) "Special output filter for the inferior Octave process. Save all output between newlines into `inferior-octave-output-list', and the rest to `inferior-octave-output-string'." === modified file 'lisp/progmodes/octave-mod.el' --- lisp/progmodes/octave-mod.el 2011-04-19 15:33:34 +0000 +++ lisp/progmodes/octave-mod.el 2011-04-22 18:44:26 +0000 @@ -893,7 +893,7 @@ (setq give-up t)))) (not give-up)))) -(defun octave-fill-paragraph (&optional arg) +(defun octave-fill-paragraph (&optional _arg) "Fill paragraph of Octave code, handling Octave comments." ;; FIXME: difference with generic fill-paragraph: ;; - code lines are only split, never joined. === modified file 'lisp/progmodes/perl-mode.el' --- lisp/progmodes/perl-mode.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/perl-mode.el 2011-04-22 18:44:26 +0000 @@ -862,7 +862,7 @@ ;; ); (progn (skip-syntax-backward "(") - (condition-case err + (condition-case nil (while (save-excursion (skip-syntax-backward " ") (not (bolp))) (forward-sexp -1)) === modified file 'lisp/progmodes/prolog.el' --- lisp/progmodes/prolog.el 2011-03-06 02:43:19 +0000 +++ lisp/progmodes/prolog.el 2011-04-22 18:44:26 +0000 @@ -1010,7 +1010,7 @@ (define-key map "\C-c\C-l" 'prolog-consult-file) (define-key map "\C-c\C-z" 'switch-to-prolog)) -(defun prolog-mode-keybindings-inferior (map) +(defun prolog-mode-keybindings-inferior (_map) "Define keybindings for inferior Prolog mode in MAP." ;; No inferior mode specific keybindings now. ) @@ -2012,15 +2012,14 @@ ;; NB: This function *MUST* have this optional argument since XEmacs ;; assumes it. This does not mean we have to use it... -(defun prolog-indent-line (&optional whole-exp) +(defun prolog-indent-line (&optional _whole-exp) "Indent current line as Prolog code. With argument, indent any additional lines of the same clause rigidly along with this one (not yet)." (interactive "p") (let ((indent (prolog-indent-level)) - (pos (- (point-max) (point))) beg) + (pos (- (point-max) (point)))) (beginning-of-line) - (setq beg (point)) (skip-chars-forward " \t") (indent-line-to indent) (if (> (- (point-max) pos) (point)) === modified file 'lisp/progmodes/ps-mode.el' --- lisp/progmodes/ps-mode.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/ps-mode.el 2011-04-22 18:44:26 +0000 @@ -541,6 +541,10 @@ (interactive) (message " *** PostScript Mode (ps-mode) Version %s *** " ps-mode-version)) +;; From reporter.el +(defvar reporter-prompt-for-summary-p) +(defvar reporter-dont-compact-list) + (defun ps-mode-submit-bug-report () "Submit via mail a bug report on PostScript mode." (interactive) === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2011-03-30 22:44:07 +0000 +++ lisp/progmodes/python.el 2011-04-22 18:44:26 +0000 @@ -2495,7 +2495,7 @@ ;; doesn't seem to work properly. (add-to-list 'hs-special-modes-alist `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" - ,(lambda (arg) + ,(lambda (_arg) (python-end-of-defun) (skip-chars-backward " \t\n")) nil)) @@ -2554,7 +2554,7 @@ (setq overlay-arrow-position nil python-pdbtrack-is-tracking-p nil))) -(defun python-pdbtrack-track-stack-file (text) +(defun python-pdbtrack-track-stack-file (_text) "Show the file indicated by the pdb stack entry line, in a separate window. Activity is disabled if the buffer-local variable @@ -2666,8 +2666,8 @@ ) ) -(defun python-pdbtrack-grub-for-buffer (funcname lineno) - "Find recent python-mode buffer named, or having function named funcname." +(defun python-pdbtrack-grub-for-buffer (funcname _lineno) + "Find recent Python mode buffer named, or having function named FUNCNAME." (let ((buffers (buffer-list)) buf got) @@ -2725,7 +2725,7 @@ (interactive) (python-pdbtrack-toggle-stack-tracking 0)) -(defun python-sentinel (proc msg) +(defun python-sentinel (_proc _msg) (setq overlay-arrow-position nil)) (provide 'python) === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2011-02-18 21:46:08 +0000 +++ lisp/progmodes/sh-script.el 2011-04-22 18:44:26 +0000 @@ -987,8 +987,7 @@ ;; rather flakey. (when (eq ?\" (nth 3 (syntax-ppss))) ; Check we matched an opening quote. ;; bingo we have a $( or a ` inside a "" - (let ((char (char-after (point))) - ;; `state' can be: double-quote, backquote, code. + (let (;; `state' can be: double-quote, backquote, code. (state (if (eq (char-before) ?`) 'backquote 'code)) ;; Stacked states in the context. (states '(double-quote))) @@ -1212,7 +1211,7 @@ ;; "For debugging: display message ARGS if variable SH-DEBUG is non-nil." ;; (if sh-debug ;; (apply 'message args))) -(defmacro sh-debug (&rest args)) +(defmacro sh-debug (&rest _args)) (defconst sh-symbol-list '((const :tag "+ " :value + @@ -2138,7 +2137,6 @@ (save-excursion (let ((have-result nil) this-kw - start val (result nil) (align-point nil) @@ -2209,7 +2207,6 @@ ;; We start off at beginning of this line. ;; Scan previous statements while this is <= ;; start of previous line. - (setq start (point)) ;; for debug only (goto-char prev-line-end) (setq x t) (while (and x (setq x (sh-prev-thing))) @@ -2614,7 +2611,7 @@ If INFO is supplied it is used, else it is calculated from current line." (let ((ofs 0) (base-value 0) - elt a b var val) + elt a b val) (or info (setq info (sh-get-indent-info))) (when info === modified file 'lisp/progmodes/simula.el' --- lisp/progmodes/simula.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/simula.el 2011-04-22 18:44:26 +0000 @@ -324,7 +324,7 @@ "Keymap used in `simula-mode'.") ;; menus for Lucid -(defun simula-popup-menu (e) +(defun simula-popup-menu (_e) "Pops up the SIMULA menu." (interactive "@e") (popup-menu (cons (concat mode-name " Mode Commands") simula-mode-menu))) @@ -1202,9 +1202,8 @@ ((eq simula-abbrev-keyword 'downcase) (downcase-word -1)) ((eq simula-abbrev-keyword 'capitalize) (capitalize-word -1))) (let ((pos (- (point-max) (point))) - (case-fold-search t) - null) - (condition-case null + (case-fold-search t)) + (condition-case nil (progn ;; check if the expanded word is on the beginning of the line. (if (and (eq (char-syntax (preceding-char)) ?w) @@ -1244,8 +1243,9 @@ The match found must not extend after that position. Optional third argument NOERROR, if t, means if fail just return nil (no error). If not nil and not t, move to limit of search and return nil." - (let (begin end context (comb-regexp (concat regexp "\\|\\")) - match (start-point (point))) + (let ((comb-regexp (concat regexp "\\|\\")) + (start-point (point)) + context match) (catch 'simula-backward (while (re-search-backward comb-regexp bound 1) ;; We have a match, check SIMULA context at match-beginning @@ -1306,8 +1306,9 @@ The match found must not extend after that position. Optional third argument NOERROR, if t, means if fail just return nil (no error). If not nil and not t, move to limit of search and return nil." - (let (begin end context (comb-regexp (concat regexp "\\|\\")) - match (start-point (point))) + (let ((comb-regexp (concat regexp "\\|\\")) + (start-point (point)) + context match) (catch 'simula-forward (while (re-search-forward comb-regexp bound 1) ;; We have a match, check SIMULA context at match-beginning === modified file 'lisp/progmodes/sql.el' --- lisp/progmodes/sql.el 2011-02-23 07:27:09 +0000 +++ lisp/progmodes/sql.el 2011-04-22 18:44:26 +0000 @@ -3540,7 +3540,7 @@ (append (list name) (sql-for-each-login `(product ,@login) - (lambda (token plist) + (lambda (token _plist) (cond ((eq token 'product) `(sql-product ',sql-product)) ((eq token 'user) `(sql-user ,sql-user)) === modified file 'lisp/progmodes/tcl.el' --- lisp/progmodes/tcl.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/tcl.el 2011-04-22 18:44:26 +0000 @@ -660,7 +660,7 @@ -(defun tcl-indent-command (&optional arg) +(defun tcl-indent-command (&optional _arg) "Indent current line as Tcl code, or in some cases insert a tab character. If `tcl-tab-always-indent' is t (the default), always indent current line. If `tcl-tab-always-indent' is nil and point is not in the indentation @@ -1506,7 +1506,7 @@ ;; loading the XEmacs menu emulation code. ;; -(defun tcl-popup-menu (e) +(defun tcl-popup-menu (_e) (interactive "@e") (popup-menu tcl-mode-menu)) === modified file 'lisp/progmodes/vera-mode.el' --- lisp/progmodes/vera-mode.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/vera-mode.el 2011-04-22 18:44:26 +0000 @@ -1,4 +1,4 @@ -;;; vera-mode.el --- major mode for editing Vera files. +;;; vera-mode.el --- major mode for editing Vera files ;; Copyright (C) 1997-2011 Free Software Foundation, Inc. @@ -1077,7 +1077,7 @@ (save-excursion (beginning-of-line) (let ((indent-point (point)) - syntax state placeholder pos) + syntax state placeholder) ;; determine syntax state (setq state (parse-partial-sexp (point-min) (point))) (cond @@ -1240,7 +1240,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; electrifications -(defun vera-electric-tab (&optional prefix-arg) +(defun vera-electric-tab (&optional prefix) "Do what I mean (indent, expand, tab, change indent, etc..). If preceding character is part of a word or a paren then `hippie-expand', else if right of non whitespace on line then `tab-to-tab-stop', @@ -1260,7 +1260,7 @@ (or (and (boundp 'hippie-expand-only-buffers) hippie-expand-only-buffers) '(vera-mode)))) - (vera-expand-abbrev prefix-arg))) + (vera-expand-abbrev prefix))) ((> (current-column) (current-indentation)) (tab-to-tab-stop)) ((and (or (eq last-command 'vera-electric-tab) @@ -1402,7 +1402,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Comments -(defun vera-comment-uncomment-region (beg end &optional arg) +(defun vera-comment-uncomment-region (beg end &optional _arg) "Comment region if not commented, uncomment region if already commented." (interactive "r\nP") (goto-char beg) === modified file 'lisp/progmodes/xscheme.el' --- lisp/progmodes/xscheme.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/xscheme.el 2011-04-22 18:44:26 +0000 @@ -511,7 +511,7 @@ (interactive) (xscheme-send-char last-command-event)) -(defun xscheme-enter-debugger-mode (prompt-string) +(defun xscheme-enter-debugger-mode (_prompt-string) (with-current-buffer (xscheme-process-buffer) (if (not (derived-mode-p 'scheme-debugger-mode)) (progn @@ -1024,8 +1024,7 @@ (xscheme-goto-output-point) (let ((old-point (point))) (while (string-match "\\(\007\\|\f\\)" string) - (let ((start (match-beginning 0)) - (end (match-end 0))) + (let ((start (match-beginning 0))) (insert-before-markers (substring string 0 start)) (if (= ?\f (aref string start)) (progn ------------------------------------------------------------ revno: 103971 committer: Chong Yidong branch nick: trunk timestamp: Thu 2011-04-21 22:35:48 -0400 message: Doc fixes for package.el. * emacs-lisp/package.el (package--builtins, package-alist) (package-load-descriptor, package-built-in-p, package-activate) (define-package, package-installed-p) (package-compute-transaction, package-buffer-info) (package--push): Doc fix. Distinguish more clearly between version strings and version lists. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-21 12:24:46 +0000 +++ lisp/ChangeLog 2011-04-22 02:35:48 +0000 @@ -1,3 +1,12 @@ +2011-04-22 Chong Yidong + + * emacs-lisp/package.el (package--builtins, package-alist) + (package-load-descriptor, package-built-in-p, package-activate) + (define-package, package-installed-p) + (package-compute-transaction, package-buffer-info) + (package--push): Doc fix. Distinguish more clearly between + version strings and version lists. + 2011-04-21 Juanma Barranquero Lexical-binding cleanup. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2011-04-06 20:33:30 +0000 +++ lisp/emacs-lisp/package.el 2011-04-22 02:35:48 +0000 @@ -290,9 +290,11 @@ Each element has the form (PKG . DESC), where PKG is a package name (a symbol) and DESC is a vector that describes the package. -The vector DESC has the form [VERSION REQS DOCSTRING]. - VERSION is a version list. - REQS is a list of packages (symbols) required by the package. +The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. + VERSION-LIST is a version list. + REQS is a list of packages required by the package, each + requirement having the form (NAME VL), where NAME is a string + and VL is a version list. DOCSTRING is a brief description of the package.") (put 'package--builtins 'risky-local-variable t) @@ -301,9 +303,11 @@ Each element has the form (PKG . DESC), where PKG is a package name (a symbol) and DESC is a vector that describes the package. -The vector DESC has the form [VERSION REQS DOCSTRING]. - VERSION is a version list. - REQS is a list of packages (symbols) required by the package. +The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. + VERSION-LIST is a version list. + REQS is a list of packages required by the package, each + requirement having the form (NAME VL) where NAME is a string + and VL is a version list. DOCSTRING is a brief description of the package. This variable is set automatically by `package-load-descriptor', @@ -358,8 +362,8 @@ (defun package-load-descriptor (dir package) "Load the description file in directory DIR for package PACKAGE. -Here, PACKAGE is a string of the form NAME-VER, where NAME is the -package name and VER is its version." +Here, PACKAGE is a string of the form NAME-VERSION, where NAME is +the package name and VERSION is its version." (let* ((pkg-dir (expand-file-name package dir)) (pkg-file (expand-file-name (concat (package-strip-version package) "-pkg") @@ -452,18 +456,21 @@ ;; Don't return nil. t)) -(defun package-built-in-p (package &optional version) - "Return true if PACKAGE, of VERSION or newer, is built-in to Emacs." +(defun package-built-in-p (package &optional min-version) + "Return true if PACKAGE is built-in to Emacs. +Optional arg MIN-VERSION, if non-nil, should be a version list +specifying the minimum acceptable version." (require 'finder-inf nil t) ; For `package--builtins'. (let ((elt (assq package package--builtins))) - (and elt (version-list-<= version (package-desc-vers (cdr elt)))))) + (and elt (min-version-<= min-version (package-desc-vers (cdr elt)))))) ;; This function goes ahead and activates a newer version of a package ;; if an older one was already activated. This is not ideal; we'd at ;; least need to check to see if the package has actually been loaded, ;; and not merely activated. -(defun package-activate (package version) - "Activate package PACKAGE, of version VERSION or newer. +(defun package-activate (package min-version) + "Activate package PACKAGE, of version MIN-VERSION or newer. +MIN-VERSION should be a version list. If PACKAGE has any dependencies, recursively activate them. Return nil if the package could not be activated." (let ((pkg-vec (cdr (assq package package-alist))) @@ -471,11 +478,11 @@ ;; Check if PACKAGE is available in `package-alist'. (when pkg-vec (setq available-version (package-desc-vers pkg-vec) - found (version-list-<= version available-version))) + found (version-list-<= min-version available-version))) (cond ;; If no such package is found, maybe it's built-in. ((null found) - (package-built-in-p package version)) + (package-built-in-p package min-version)) ;; If the package is already activated, just return t. ((memq package package-activated-list) t) @@ -512,11 +519,11 @@ &rest extra-properties) "Define a new package. NAME-STRING is the name of the package, as a string. -VERSION-STRING is the version of the package, as a list of -integers of the form produced by `version-to-list'. +VERSION-STRING is the version of the package, as a string. DOCSTRING is a short description of the package, a string. REQUIREMENTS is a list of dependencies on other packages. -Each requirement is of the form (OTHER-PACKAGE \"VERSION\"). + Each requirement is of the form (OTHER-PACKAGE OTHER-VERSION), + where OTHER-VERSION is a string. EXTRA-PROPERTIES is currently unused." (let* ((name (intern name-string)) @@ -703,8 +710,8 @@ (package-unpack name version)))) (defun package-installed-p (package &optional min-version) - "Return true if PACKAGE, of VERSION or newer, is installed. -Built-in packages also qualify." + "Return true if PACKAGE, of MIN-VERSION or newer, is installed. +MIN-VERSION should be a version list." (let ((pkg-desc (assq package package-alist))) (if pkg-desc (version-list-<= min-version @@ -717,9 +724,9 @@ PACKAGE-LIST should be a list of package names (symbols). REQUIREMENTS should be a list of additional requirements; each -element in this list should have the form (PACKAGE VERSION), -where PACKAGE is a package name and VERSION is the required -version of that package (as a list). +element in this list should have the form (PACKAGE VERSION-LIST), +where PACKAGE is a package name and VERSION-LIST is the required +version of that package. This function recursively computes the requirements of the packages in REQUIREMENTS, and returns a list of all the packages @@ -890,7 +897,8 @@ [FILENAME REQUIRES DESCRIPTION VERSION COMMENTARY] FILENAME is the file name, a string, sans the \".el\" extension. -REQUIRES is a requires list, or nil. +REQUIRES is a list of requirements, each requirement having the + form (NAME VER); NAME is a string and VER is a version list. DESCRIPTION is the package description, a string. VERSION is the version, a string. COMMENTARY is the commentary section, a string, or nil if none. @@ -1329,8 +1337,8 @@ "Convenience macro for `package-menu--generate'. If the alist stored in the symbol LISTNAME lacks an entry for a package PACKAGE with descriptor DESC, add one. The alist is -keyed with cons cells (PACKAGE . VERSION), where PACKAGE is a -symbol and VERSION is a version list." +keyed with cons cells (PACKAGE . VERSION-LIST), where PACKAGE is +a symbol and VERSION-LIST is a version list." `(let* ((version (package-desc-vers ,desc)) (key (cons ,package version))) (unless (assoc key ,listname) ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.