diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-06-03 05:49:26 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-06-03 05:49:26 +0000 |
commit | 8736257554f49445f7b4402ac7a9436b38ce6452 (patch) | |
tree | de0478f60f773c3e09c6c4fcbed3b6ea1641e74c /lisp/emacs-lisp | |
parent | 93d7a3669284221c9272784875f69c047873fe04 (diff) | |
parent | d06e384795d5ca4e82c88273847eeb9d01380046 (diff) | |
download | emacs-8736257554f49445f7b4402ac7a9436b38ce6452.tar.gz emacs-8736257554f49445f7b4402ac7a9436b38ce6452.tar.bz2 emacs-8736257554f49445f7b4402ac7a9436b38ce6452.zip |
Merged from miles@gnu.org--gnu-2005 (patch 74-79, 332-349)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-332
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-333
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-334
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-335
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-336
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-337
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-338
etc/emacs-buffer.gdb: Remove RCS keywords
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-340
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-341
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-342
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-343
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-344
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-346
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-347
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-348
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-349
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-74
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-75
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-76
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-77
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-78
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-79
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-349
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 18 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 11 | ||||
-rw-r--r-- | lisp/emacs-lisp/easymenu.el | 14 | ||||
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 4 |
4 files changed, 31 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e5b429604c7..3948dae610b 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1248,15 +1248,15 @@ extra args." (defun byte-compile-nogroup-warn (form) (let ((keyword-args (cdr (cdr (cdr (cdr form))))) (name (cadr form))) - (unless (plist-get keyword-args :group) - (byte-compile-warn - "%s for `%s' fails to specify containing group" - (cdr (assq (car form) - '((custom-declare-group . defgroup) - (custom-declare-face . defface) - (custom-declare-variable . defcustom)))) - (if (and (consp name) (eq (car name) 'quote)) - (cadr name) name))))) + (or (plist-get keyword-args :group) + (not (and (consp name) (eq (car name) 'quote))) + (byte-compile-warn + "%s for `%s' fails to specify containing group" + (cdr (assq (car form) + '((custom-declare-group . defgroup) + (custom-declare-face . defface) + (custom-declare-variable . defcustom)))) + (cadr name))))) ;; Warn if the function or macro is being redefined with a different ;; number of arguments. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 4a01181e777..0301476afc2 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1565,14 +1565,21 @@ form. See `defsetf' for a simpler way to define most setf-methods. This macro is an easy-to-use substitute for `define-setf-method' that works well for simple place forms. In the simple `defsetf' form, `setf's of the form (setf (NAME ARGS...) VAL) are transformed to function or macro -calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). +calls of the form (FUNC ARGS... VAL). Example: + + (defsetf aref aset) + Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). Here, the above `setf' call is expanded by binding the argument forms ARGS according to ARGLIST, binding the value form VAL to STORE, then executing BODY, which must return a Lisp form that does the necessary `setf' operation. Actually, ARGLIST and STORE may be bound to temporary variables which are introduced automatically to preserve proper execution order of the arguments. -Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." +Example: + + (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v)) + +\(fn NAME [FUNC | ARGLIST (STORE) BODY...])" (if (listp arg1) (let* ((largs nil) (largsr nil) (temps nil) (tempsr nil) diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index b3160c9b752..982570fb348 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -1,6 +1,7 @@ ;;; easymenu.el --- support the easymenu interface for defining a menu -;; Copyright (C) 1994,96,98,1999,2000,2004 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1996, 1998, 1999, 2000, 2004, 2005 +;; Free Software Foundation, Inc. ;; Keywords: emulations ;; Author: Richard Stallman <rms@gnu.org> @@ -534,7 +535,7 @@ earlier by `easy-menu-define' or `easy-menu-create-menu'." (easy-menu-do-add-item map item before))) (defun easy-menu-item-present-p (map path name) - "In submenu of MAP with path PATH, return true iff item NAME is present. + "In submenu of MAP with path PATH, return non-nil iff item NAME is present. MAP and PATH are defined as in `easy-menu-add-item'. NAME should be a string, the name of the element to be looked for." (easy-menu-return-item (easy-menu-get-map map path) name)) @@ -552,7 +553,14 @@ NAME should be a string, the name of the element to be removed." "In menu MENU try to look for menu item with name NAME. If a menu item is found, return (NAME . item), otherwise return nil. If item is an old format item, a new format item is returned." - (let ((item (lookup-key menu (vector (easy-menu-intern name)))) + ;; The call to `lookup-key' also calls the C function `get_keyelt' which + ;; looks inside a menu-item to only return the actual command. This is + ;; not what we want here. We should either add an arg to lookup-key to be + ;; able to turn off this "feature", or else we could use map-keymap here. + ;; In the mean time, I just use `assq' which is an OK approximation since + ;; menus are rarely built from vectors or char-tables. + (let ((item (or (cdr (assq name menu)) + (lookup-key menu (vector (easy-menu-intern name))))) ret enable cache label) (cond ((stringp (car-safe item)) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index eab957e5671..9a0a1606953 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -246,8 +246,6 @@ searched for in `find-function-source-path' if non nil, otherwise in `load-path'." (if (not function) (error "You didn't specify a function")) - (and (subrp (symbol-function function)) - (error "%s is a primitive function" function)) (let ((def (symbol-function function)) aliases) (while (symbolp def) @@ -265,6 +263,8 @@ in `load-path'." (let ((library (cond ((eq (car-safe def) 'autoload) (nth 1 def)) + ((subrp def) + (help-C-file-name def 'subr)) ((symbol-file function 'defun))))) (find-function-search-for-symbol function nil library)))) |