/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.430 by rms, Mon Dec 13 19:26:42 2004 UTC revision 1.431 by rms, Mon Dec 27 16:23:34 2004 UTC
# Line 823  is converted into a string by expressing Line 823  is converted into a string by expressing
823  (defalias 'unfocus-frame 'ignore "")  (defalias 'unfocus-frame 'ignore "")
824    
825    
826  ;;;; Obsolescence declarations for variables.  ;;;; Obsolescence declarations for variables, and aliases.
827    
828  (make-obsolete-variable 'directory-sep-char "do not use it." "21.1")  (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")  (make-obsolete-variable 'mode-line-inverse-video "use the appropriate faces instead." "21.1")
# Line 840  is converted into a string by expressing Line 840  is converted into a string by expressing
840  (make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4")  (make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4")
841  (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)  (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)
842  (make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4")  (make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4")
843    
844    (defvaralias 'messages-buffer-max-lines 'message-log-max)
845    
846  ;;;; Alternate names for functions - these are not being phased out.  ;;;; Alternate names for functions - these are not being phased out.
847    
# Line 1012  other hooks, such as major mode hooks, c Line 1014  other hooks, such as major mode hooks, c
1014  ;;;       nil nil t)  ;;;       nil nil t)
1015  ;;;     (setq symbol-file-load-history-loaded t)))  ;;;     (setq symbol-file-load-history-loaded t)))
1016    
1017  (defun symbol-file (function)  (defun symbol-file (symbol &optional type)
1018    "Return the input source from which FUNCTION was loaded.    "Return the input source in which SYMBOL was defined.
1019  The value is normally a string that was passed to `load':  The value is normally a string that was passed to `load':
1020  either an absolute file name, or a library name  either an absolute file name, or a library name
1021  \(with no directory name and no `.el' or `.elc' at the end).  \(with no directory name and no `.el' or `.elc' at the end).
1022  It can also be nil, if the definition is not associated with any file."  It can also be nil, if the definition is not associated with any file.
1023    (if (and (symbolp function) (fboundp function)  
1024             (eq 'autoload (car-safe (symbol-function function))))  If TYPE is nil, then any kind of definition is acceptable.
1025        (nth 1 (symbol-function function))  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))
1031      (let ((files load-history)      (let ((files load-history)
1032            file)            file)
1033        (while files        (while files
1034          (if (member function (cdr (car files)))          (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)))))
1044              (setq file (car (car files)) files nil))              (setq file (car (car files)) files nil))
1045          (setq files (cdr files)))          (setq files (cdr files)))
1046        file)))        file)))

Legend:
Removed from v.1.430  
changed lines
  Added in v.1.431

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26