diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0edb0ba..48e37bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ jobs: - '27.1' - '28.1' - '29.1' + - '30.1' steps: - uses: purcell/setup-emacs@master diff --git a/helpful.el b/helpful.el index 9516e46..df1e1b7 100644 --- a/helpful.el +++ b/helpful.el @@ -3000,6 +3000,100 @@ See also `helpful-max-buffers'." (when (eq (buffer-local-value 'major-mode buffer) 'helpful-mode) (kill-buffer buffer)))) +;; overrides in apropos to try to use helpful-* instead. + +(require 'apropos) + +(define-button-type 'apropos-function + 'apropos-label "Function" + 'apropos-short-label "f" + 'face 'apropos-function-button + 'help-echo "mouse-2, RET: Display more help on this function" + 'follow-link t + 'action (lambda (button) + (helpful-function (button-get button 'apropos-symbol)))) + +(define-button-type 'apropos-macro + 'apropos-label "Macro" + 'apropos-short-label "m" + 'face 'apropos-function-button + 'help-echo "mouse-2, RET: Display more help on this macro" + 'follow-link t + 'action (lambda (button) + (helpful-function (button-get button 'apropos-symbol)))) + +(define-button-type 'apropos-command + 'apropos-label "Command" + 'apropos-short-label "c" + 'face 'apropos-function-button + 'help-echo "mouse-2, RET: Display more help on this command" + 'follow-link t + 'action (lambda (button) + (helpful-function (button-get button 'apropos-symbol)))) + +(define-button-type 'apropos-variable + 'apropos-label "Variable" + 'apropos-short-label "v" + 'face 'apropos-variable-button + 'help-echo "mouse-2, RET: Display more help on this variable" + 'follow-link t + 'action (lambda (button) + (helpful-variable (button-get button 'apropos-symbol)))) + +(define-button-type 'apropos-user-option + 'apropos-label "User option" + 'apropos-short-label "o" + 'face 'apropos-user-option-button + 'help-echo "mouse-2, RET: Display more help on this user option" + 'follow-link t + 'action (lambda (button) + (helpful-variable (button-get button 'apropos-symbol)))) + +;;; TODO: these need helpful functions before they can be hooked up: + +;; (define-button-type 'apropos-face +;; 'apropos-label "Face" +;; 'apropos-short-label "F" +;; 'face '(font-lock-variable-name-face button) +;; 'help-echo "mouse-2, RET: Display more help on this face" +;; 'follow-link t +;; 'action (lambda (button) +;; (describe-face (button-get button 'apropos-symbol)))) + +;; (define-button-type 'apropos-group +;; 'apropos-label "Group" +;; 'apropos-short-label "g" +;; 'face 'apropos-misc-button +;; 'help-echo "mouse-2, RET: Display more help on this group" +;; 'follow-link t +;; 'action (lambda (button) +;; (customize-group-other-window +;; (button-get button 'apropos-symbol)))) + +;; (define-button-type 'apropos-widget +;; 'apropos-label "Widget" +;; 'apropos-short-label "w" +;; 'face 'apropos-misc-button +;; 'help-echo "mouse-2, RET: Display more help on this widget" +;; 'follow-link t +;; 'action (lambda (button) +;; (widget-browse-other-window (button-get button 'apropos-symbol)))) + +;; (define-button-type 'apropos-plist +;; 'apropos-label "Properties" +;; 'apropos-short-label "p" +;; 'face 'apropos-misc-button +;; 'help-echo "mouse-2, RET: Display more help on this plist" +;; 'follow-link t +;; 'action (lambda (button) +;; (apropos-describe-plist (button-get button 'apropos-symbol)))) + +;; (define-button-type 'apropos-library +;; 'help-echo "mouse-2, RET: Display more help on this library" +;; 'follow-link t +;; 'action (lambda (button) +;; (apropos-library (button-get button 'apropos-symbol)))) + (defvar helpful-mode-map (let* ((map (make-sparse-keymap))) (define-key map (kbd "g") #'helpful-update)