diff options
| author | Glenn Morris | 2009-02-24 03:32:19 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-02-24 03:32:19 +0000 |
| commit | 92bd667f241641d811cb81bee584f7aa3539edf5 (patch) | |
| tree | bd66987d06b83da00121ee8294f35dc0292cf13c | |
| parent | 433c16523a52d5a64aab71723a9fcbc6162f7de8 (diff) | |
| download | emacs-92bd667f241641d811cb81bee584f7aa3539edf5.tar.gz emacs-92bd667f241641d811cb81bee584f7aa3539edf5.zip | |
(elint-unknown-builtin-args): Fix encode-time spec. (Bug#2453)
(elint-find-builtin-args): Make the match more restrictive.
Handle errors. Return a result actually containing the function name.
| -rw-r--r-- | lisp/ChangeLog | 21 | ||||
| -rw-r--r-- | lisp/emacs-lisp/elint.el | 24 |
2 files changed, 31 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 51cdc497f14..99b3bd7f293 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2009-02-24 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * eshell/esh-util.el (eshell-parse-ange-ls): Define `name' before | ||
| 4 | potential use. | ||
| 5 | |||
| 6 | * progmodes/cperl-mode.el (cperl-find-pods-heres): | ||
| 7 | Don't globally bind `name'. | ||
| 8 | |||
| 9 | * emacs-lisp/elint.el (elint-unknown-builtin-args): | ||
| 10 | Fix encode-time spec. (Bug#2453) | ||
| 11 | (elint-find-builtin-args): Make the match more restrictive. | ||
| 12 | Handle errors. Return a result actually containing the function name. | ||
| 13 | |||
| 14 | * mail/rmail.el (rmail): Don't show a message if rmail-get-new-mail | ||
| 15 | already did. (Bug#2440) | ||
| 16 | (rmail-quit): Don't swap buffers. (Bug#2441) | ||
| 17 | (rmail-list-to-menu): Don't globally bind `name'. | ||
| 18 | |||
| 1 | 2009-02-23 Chong Yidong <cyd@stupidchicken.com> | 19 | 2009-02-23 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 20 | ||
| 3 | * net/ange-ftp.el (ange-ftp-insert-directory): Adapt switch | 21 | * net/ange-ftp.el (ange-ftp-insert-directory): Adapt switch |
| @@ -11,8 +29,7 @@ | |||
| 11 | 2009-02-23 Geoff Gole <geoffgole@gmail.com> (tiny change) | 29 | 2009-02-23 Geoff Gole <geoffgole@gmail.com> (tiny change) |
| 12 | 30 | ||
| 13 | * ibuffer.el (ibuffer-redisplay-engine): Avoid "Mark set" message | 31 | * ibuffer.el (ibuffer-redisplay-engine): Avoid "Mark set" message |
| 14 | clobbering the useful message from `ibuffer-toggle-sorting-mode'. | 32 | clobbering useful message from `ibuffer-toggle-sorting-mode'. (Bug#2439) |
| 15 | (Bug#2439) | ||
| 16 | 33 | ||
| 17 | 2009-02-23 Miles Bader <miles@gnu.org> | 34 | 2009-02-23 Miles Bader <miles@gnu.org> |
| 18 | 35 | ||
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index a58cd3eae09..bc38abce259 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; elint.el --- Lint Emacs Lisp | 1 | ;;; elint.el --- Lint Emacs Lisp |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, | 3 | ;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, |
| 4 | ;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 4 | ;; 2009 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Peter Liljenberg <petli@lysator.liu.se> | 6 | ;; Author: Peter Liljenberg <petli@lysator.liu.se> |
| 7 | ;; Created: May 1997 | 7 | ;; Created: May 1997 |
| @@ -107,7 +107,7 @@ | |||
| 107 | (if cond then &rest else) | 107 | (if cond then &rest else) |
| 108 | (apply function &rest args) | 108 | (apply function &rest args) |
| 109 | (format string &rest args) | 109 | (format string &rest args) |
| 110 | (encode-time second minute hour day month year zone &rest args) | 110 | (encode-time second minute hour day month year &optional zone) |
| 111 | (min &rest args) | 111 | (min &rest args) |
| 112 | (logand &rest args) | 112 | (logand &rest args) |
| 113 | (logxor &rest args) | 113 | (logxor &rest args) |
| @@ -506,6 +506,7 @@ Returns `unknown' if we couldn't find arguments." | |||
| 506 | (let ((fcode (indirect-function func))) | 506 | (let ((fcode (indirect-function func))) |
| 507 | (if (subrp fcode) | 507 | (if (subrp fcode) |
| 508 | (let ((args (get func 'elint-args))) | 508 | (let ((args (get func 'elint-args))) |
| 509 | ;; FIXME builtins with no args have args = nil. | ||
| 509 | (if args args 'unknown)) | 510 | (if args args 'unknown)) |
| 510 | (elint-find-args-in-code fcode))) | 511 | (elint-find-args-in-code fcode))) |
| 511 | 'undefined) | 512 | 'undefined) |
| @@ -792,15 +793,14 @@ functions, otherwise use LIST. | |||
| 792 | Each functions is represented by a cons cell: | 793 | Each functions is represented by a cons cell: |
| 793 | \(function-symbol . args) | 794 | \(function-symbol . args) |
| 794 | If no documentation could be found args will be `unknown'." | 795 | If no documentation could be found args will be `unknown'." |
| 795 | 796 | (mapcar (lambda (f) | |
| 796 | (mapcar (function (lambda (f) | 797 | (let ((doc (documentation f t))) |
| 797 | (let ((doc (documentation f t))) | 798 | (or (and doc |
| 798 | (if (and doc (string-match "\n\n\\((.*)\\)" doc)) | 799 | (string-match "\n\n(fn\\(.*)\\)\\'" doc) |
| 799 | (read (match-string 1 doc)) | 800 | (ignore-errors |
| 800 | (cons f 'unknown)) | 801 | (read (format "(%s %s" f (match-string 1 doc))))) |
| 801 | ))) | 802 | (cons f 'unknown)))) |
| 802 | (if list list | 803 | (or list (elint-find-builtins)))) |
| 803 | (elint-find-builtins)))) | ||
| 804 | 804 | ||
| 805 | (provide 'elint) | 805 | (provide 'elint) |
| 806 | 806 | ||