Mercurial > emacs
comparison lisp/subr.el @ 83238:223c12363c0c
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-747
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-748
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-749
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-750
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-751
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-752
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-78
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-79
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-80
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-278
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 06 Jan 2005 15:00:09 +0000 |
parents | 4ee39d9428b0 f38536b30f3a |
children | 025da3ba778e |
comparison
equal
deleted
inserted
replaced
83237:4ee39d9428b0 | 83238:223c12363c0c |
---|---|
821 | 821 |
822 (defalias 'focus-frame 'ignore "") | 822 (defalias 'focus-frame 'ignore "") |
823 (defalias 'unfocus-frame 'ignore "") | 823 (defalias 'unfocus-frame 'ignore "") |
824 | 824 |
825 | 825 |
826 ;;;; Obsolescence declarations for variables. | 826 ;;;; Obsolescence declarations for variables, and aliases. |
827 | 827 |
828 (make-obsolete-variable 'directory-sep-char "do not use it." "21.1") | 828 (make-obsolete-variable 'directory-sep-char "do not use it." "21.1") |
829 (make-obsolete-variable 'mode-line-inverse-video "use the appropriate faces instead." "21.1") | 829 (make-obsolete-variable 'mode-line-inverse-video "use the appropriate faces instead." "21.1") |
830 (make-obsolete-variable 'unread-command-char | 830 (make-obsolete-variable 'unread-command-char |
831 "use `unread-command-events' instead. That variable is a list of events to reread, so it now uses nil to mean `no event', instead of -1." | 831 "use `unread-command-events' instead. That variable is a list of events to reread, so it now uses nil to mean `no event', instead of -1." |
838 | 838 |
839 (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions) | 839 (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions) |
840 (make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4") | 840 (make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4") |
841 (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions) | 841 (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions) |
842 (make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4") | 842 (make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4") |
843 | |
844 (defvaralias 'messages-buffer-max-lines 'message-log-max) | |
843 | 845 |
844 ;;;; Alternate names for functions - these are not being phased out. | 846 ;;;; Alternate names for functions - these are not being phased out. |
845 | 847 |
846 (defalias 'string= 'string-equal) | 848 (defalias 'string= 'string-equal) |
847 (defalias 'string< 'string-lessp) | 849 (defalias 'string< 'string-lessp) |
1010 ;;; exec-directory) | 1012 ;;; exec-directory) |
1011 ;;; ;; The file name fns-%s.el already has a .el extension. | 1013 ;;; ;; The file name fns-%s.el already has a .el extension. |
1012 ;;; nil nil t) | 1014 ;;; nil nil t) |
1013 ;;; (setq symbol-file-load-history-loaded t))) | 1015 ;;; (setq symbol-file-load-history-loaded t))) |
1014 | 1016 |
1015 (defun symbol-file (function) | 1017 (defun symbol-file (symbol &optional type) |
1016 "Return the input source from which FUNCTION was loaded. | 1018 "Return the input source in which SYMBOL was defined. |
1017 The value is normally a string that was passed to `load': | 1019 The value is normally a string that was passed to `load': |
1018 either an absolute file name, or a library name | 1020 either an absolute file name, or a library name |
1019 \(with no directory name and no `.el' or `.elc' at the end). | 1021 \(with no directory name and no `.el' or `.elc' at the end). |
1020 It can also be nil, if the definition is not associated with any file." | 1022 It can also be nil, if the definition is not associated with any file. |
1021 (if (and (symbolp function) (fboundp function) | 1023 |
1022 (eq 'autoload (car-safe (symbol-function function)))) | 1024 If TYPE is nil, then any kind of definition is acceptable. |
1023 (nth 1 (symbol-function function)) | 1025 If type is `defun' or `defvar', that specifies function |
1026 definition only or variable definition only." | |
1027 (if (and (or (null type) (eq type 'defun)) | |
1028 (symbolp symbol) (fboundp symbol) | |
1029 (eq 'autoload (car-safe (symbol-function symbol)))) | |
1030 (nth 1 (symbol-function symbol)) | |
1024 (let ((files load-history) | 1031 (let ((files load-history) |
1025 file) | 1032 file) |
1026 (while files | 1033 (while files |
1027 (if (member function (cdr (car files))) | 1034 (if (if type |
1035 (if (eq type 'defvar) | |
1036 ;; Variables are present just as their names. | |
1037 (member symbol (cdr (car files))) | |
1038 ;; Other types are represented as (TYPE . NAME). | |
1039 (member (cons type symbol) (cdr (car files)))) | |
1040 ;; We accept all types, so look for variable def | |
1041 ;; and then for any other kind. | |
1042 (or (member symbol (cdr (car files))) | |
1043 (rassq symbol (cdr (car files))))) | |
1028 (setq file (car (car files)) files nil)) | 1044 (setq file (car (car files)) files nil)) |
1029 (setq files (cdr files))) | 1045 (setq files (cdr files))) |
1030 file))) | 1046 file))) |
1031 | 1047 |
1032 | 1048 |