diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-01-16 22:52:15 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-01-16 22:52:15 -0500 |
commit | 24b7f77581c7eefe484db6cbbd661c04460c66aa (patch) | |
tree | 59bf6bdfba55d0f5aeb73a755e2420ce19ac7c3a /lisp/help-mode.el | |
parent | a2cd6d90d20408a6265c8615697dbff94df3f098 (diff) | |
download | emacs-24b7f77581c7eefe484db6cbbd661c04460c66aa.tar.gz |
Improve handling of doc-strings and describe-function for cl-generic
* lisp/help-fns.el (find-lisp-object-file-name): Accept any `type' as long
as it's a symbol.
(help-fns-short-filename): New function.
(describe-function-1): Use it. Use autoload-do-load.
* lisp/help-mode.el (help-function-def): Add optional arg `type'.
* lisp/emacs-lisp/cl-generic.el (cl-generic-ensure-function): It's OK to
override an autoload.
(cl-generic-current-method-specializers): Replace dyn-bind variable
with a lexically-scoped macro.
(cl--generic-lambda): Update accordingly.
(cl-generic-define-method): Record manually in the load-history with
type `cl-defmethod'.
(cl--generic-get-dispatcher): Minor optimization.
(cl--generic-search-method): New function.
(find-function-regexp-alist): Add entry for `cl-defmethod' type.
(cl--generic-search-method): Add hyperlinks for methods. Merge the
specializers and the function's arguments.
* lisp/emacs-lisp/eieio-core.el (eieio--defalias): Move to eieio-generic.el.
(eieio-defclass-autoload): Don't record the superclasses any more.
(eieio-defclass-internal): Reuse the old class object if it was just an
autoload stub.
(eieio--class-precedence-list): Load the class if it's autoloaded.
* lisp/emacs-lisp/eieio-generic.el (eieio--defalias): Move from eieio-core.
(eieio--defgeneric-init-form): Don't throw away a previous docstring.
(eieio--method-optimize-primary): Don't mess with the docstring.
(defgeneric): Keep the `args' in the docstring.
(defmethod): Don't use the method's docstring for the generic
function's docstring.
* lisp/emacs-lisp/find-func.el: Use lexical-binding.
(find-function-regexp): Don't rule out `defgeneric'.
(find-function-regexp-alist): Document new possibility of including
a function instead of a regexp.
(find-function-search-for-symbol): Implement that new possibility.
(find-function-library): Don't assume that `function' is a symbol.
(find-function-do-it): Remove unused var `orig-buf'.
* test/automated/cl-generic-tests.el (cl-generic-test-8-after/before):
Rename from cl-generic-test-7-after/before.
(cl--generic-test-advice): New function.
(cl-generic-test-9-advice): New test.
* test/automated/eieio-test-methodinvoke.el (eieio-test-cl-generic-1): Reset
eieio-test--1.
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r-- | lisp/help-mode.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index dd2030706b2..c62ddc3dcd0 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -191,7 +191,7 @@ The format is (FUNCTION ARGS...).") (define-button-type 'help-function-def :supertype 'help-xref - 'help-function (lambda (fun file) + 'help-function (lambda (fun file &optional type) (require 'find-func) (when (eq file 'C-source) (setq file @@ -199,7 +199,7 @@ The format is (FUNCTION ARGS...).") ;; Don't use find-function-noselect because it follows ;; aliases (which fails for built-in functions). (let ((location - (find-function-search-for-symbol fun nil file))) + (find-function-search-for-symbol fun type file))) (pop-to-buffer (car location)) (if (cdr location) (goto-char (cdr location)) |