diff --git a/ChangeLog b/ChangeLog index f1c201b7..e00dba41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,54 @@ +2026-03-29 Mats Lidell + +* hproperty.el: Remove defalias of display-color-p, defined since + Emacs 21.1 + hsys-flymake.el (flymake-mode-hook): Use repeat-mode, defined since + Emacs 28.1. + hui-mouse.el (hkey-alist): Use button-at, defined in Emacs before + version 28. + (smart-dired): Use dired-do-flagged-delete, defined since before Emacs 28. + hyperbole.el: Use macroexp-file-name, defined since Emacs 28.1. + htz.el (htz:zone-to-hour): Use current-time-zone, defined in Emacs 25.1 + hui-window.el (assist-key-modeline-click-left-edge): Use last, + defined before Emacs 28. + (hmouse-horizontal-action-drag): Use split-window-vertically. + (smart-coords-in-window-p): Use window-edges, defined before Emacs 28. + hinit.el (hyperb:check-dir-user): Use make-directory, defined since + Emacs 19.34. + hmouse-info.el (smart-info): Use Info-next and mouse-event-p. + (smart-info-assist): Use Info-prev and mouse-event-p. + hycontrol.el (hycontrol-windows-mode-map): Use text-scale-increase + and text-scale-decrease. + hui-select.el (hui-select-thing): Use use-region-p, defined since + Emacs 23.1. + hypb.el (hypb:hkey-help-file): Do not check for locate-data-file, it + is not an Emacs function. + (hypb:insert-hyperbole-banner): Do not check for locate-data-file, not + an Emacs function. + hact.el (action:commandp): Do not use compiled-function-interactive. + (action:params): Do not use compiled-function-arglist. Not Emacs + functions. + hib-social.el (git-reference): Use vc-print-root-log, defined since + Emacs 24.1. + (hibtypes-git-find): Use locate-dominating-file, defined before Emacs 28. + hibtypes.el (gnus-push-button): Use get-text-property. + hmoccur.el (moccur): + hui.el (hui:ebut-search): Use outline-minor-mode, defined since Emacs 19.1. + hmouse-drv.el (mouse-drag-mode-line): Use mouse-drag-frame-move, + defined since Emacs 28. + (hmouse-window-at-absolute-pixel-position): Use frame-list-z-order, + defined since Emacs 26.1. + hmouse-tag.el (smart-lisp): + (smart-lisp-at-known-identifier-p): Use find-library, defined since + Emacs 25.2. + (smart-lisp-find-tag): + (smart-lisp-at-known-identifier-p): Use find-function-noselect, + defined before Emacs 28. + hyrolo.el (reveal-hide-revealed): Use reveal-hide-revealed, defined + since Emacs 28.1. + (reveal-auto-hide): Use reveal-auto-hide, defined since Emacs 28.1. + (hyrolo-add): Use mail-fetch-field, defined before Emacs 28. + 2026-03-28 Bob Weiner * hypb.el (hypb:sqlite-p): Add to return non-nil when Emacs supports sqlite. diff --git a/hact.el b/hact.el index a3b45e8e..342dd8a4 100644 --- a/hact.el +++ b/hact.el @@ -314,13 +314,11 @@ TYPE and TYPE-CATEGORY are both symbols. TYPE-CATEGORY must be one of (eq (car function) 'autoload)) (error "(action:commandp): Autoload not supported: %s" function)) (t function)))) - (cond ((and action (fboundp 'interactive-form)) + (cond (action (interactive-form action)) ((byte-code-function-p action) - (cond ((fboundp 'compiled-function-interactive) - (compiled-function-interactive action)) - ((commandp action) - (list 'interactive (aref action 5))))) + (when (commandp action) + (list 'interactive (aref action 5)))) (t (commandp action))))) (defun action:create (param-list body) @@ -371,9 +369,7 @@ Autoloads action function if need be to get the parameter list." (error "(action:params): Autoload not supported: %s" action)) (t (car (cdr action))))) ((byte-code-function-p action) - (if (fboundp 'compiled-function-arglist) - (compiled-function-arglist action) - (action:params-emacs action))) + (action:params-emacs action)) ((symbolp action) (car (cdr (and (fboundp action) (hypb:indirect-function action))))) ((and (fboundp 'closurep) (closurep action)) diff --git a/hib-social.el b/hib-social.el index 4608a608..588d03fd 100644 --- a/hib-social.el +++ b/hib-social.el @@ -829,7 +829,7 @@ no PROJECT value is provided, it defaults to the value of (when project-dir (setq project-dir (expand-file-name project-dir))) (cond ((and project-dir (file-readable-p project-dir) (file-directory-p project-dir)) (if reference - (if (and (equal ref-type "commits") (fboundp 'vc-print-root-log)) + (if (equal ref-type "commits") (let ((default-directory project-dir)) (vc-print-root-log)) ;; Display commit diffs in a help buffer @@ -886,8 +886,7 @@ Return nil if no match is found." (let (root) (cond ;; Try to find in current directory tree first... - ((and (fboundp 'locate-dominating-file) - (setq root (locate-dominating-file default-directory ".git")) + ((and (setq root (locate-dominating-file default-directory ".git")) (hibtypes-git-find-execute "find" root file))) ;; then in default project tree... ((and hibtypes-git-default-project diff --git a/hibtypes.el b/hibtypes.el index 7508cde0..3d97f9f1 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -1523,8 +1523,7 @@ documentation string is displayed." (defib gnus-push-button () "Activate GNUS-specific article push-buttons, e.g. for hiding signatures. GNUS is a news and mail reader." - (and (fboundp 'get-text-property) - (fboundp 'gnus-article-press-button) + (and (fboundp 'gnus-article-press-button) (get-text-property (point) 'gnus-callback) (let* ((but (button-at (point))) (but-start (when but (button-start but))) diff --git a/hinit.el b/hinit.el index 51aeda85..3ea4f594 100644 --- a/hinit.el +++ b/hinit.el @@ -90,9 +90,7 @@ ((not (file-writable-p parent-dir)) (error "(hyperb:init): `hbmap:dir-user' parent directory not writable")) - ((or (if (fboundp 'make-directory) - (progn (make-directory hbmap:dir-user) t)) - (hypb:call-process-p "mkdir" nil nil hbmap:dir-user)) + ((progn (make-directory hbmap:dir-user) t) (or (file-writable-p hbmap:dir-user) (or (progn (hypb:chmod '+ 700 hbmap:dir-user) (file-writable-p hbmap:dir-user)) diff --git a/hmoccur.el b/hmoccur.el index 61f5899a..6243ca18 100644 --- a/hmoccur.el +++ b/hmoccur.el @@ -144,10 +144,9 @@ With optional NO-FOLD-SEARCH non-nil do case sensitive search. (progn (set-buffer occbuf) (moccur-mode) - (if (fboundp 'outline-minor-mode) - (and (progn (goto-char 1) - (search-forward "\C-m" nil t)) - (outline-minor-mode 1))) + (and (progn (goto-char 1) + (search-forward "\C-m" nil t)) + (outline-minor-mode 1)) (goto-char (point-min)) (pop-to-buffer occbuf) (message "%d matches." matches) diff --git a/hmouse-drv.el b/hmouse-drv.el index 6edac902..b1235e35 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -1022,9 +1022,7 @@ frame instead." ((and (frame-parameter frame 'drag-with-mode-line) (window-at-side-p window 'bottom)) ;; Drag frame when the window is on the bottom of its frame. - (if (fboundp 'mouse-drag-frame-move) ;; From Emacs 28 - (mouse-drag-frame-move start-event) - (mouse-drag-frame start-event 'move)))))) + (mouse-drag-frame-move start-event))))) (defun hkey-debug (pred pred-value hkey-action) "Display a message with the context and values from Smart Key activation." @@ -1532,9 +1530,7 @@ the position (not below another application's window)." ;; 26 and above. For prior versions, the ordering of the frames ;; returned is not guaranteed, so the frame whose window is returned ;; may not be the uppermost. - (let* ((top-to-bottom-frames (if (fboundp 'frame-list-z-order) - (frame-list-z-order) - (frame-list))) + (let* ((top-to-bottom-frames (frame-list-z-order)) (pos-x (car position)) (pos-y (cdr position)) edges left top right bottom diff --git a/hmouse-info.el b/hmouse-info.el index 1c11892e..64c53069 100644 --- a/hmouse-info.el +++ b/hmouse-info.el @@ -91,23 +91,17 @@ or a Menu; otherwise returns nil." ;; If at end of node, go to next node ;; ((last-line-p) - (if (fboundp 'Info-global-next) - (Info-global-next) - (Info-next))) - ((and (fboundp 'Info-mouse-follow-link) - (mouse-event-p action-key-release-args) + (Info-next)) + ((and (mouse-event-p action-key-release-args) (let ((opoint (point))) (Info-mouse-follow-link action-key-release-args) (/= opoint (point))))) - ((and (fboundp 'mouse-event-p) - (not (mouse-event-p action-key-release-args)) + ((and (not (mouse-event-p action-key-release-args)) (Info-handle-in-node-hdr))) ((Info-handle-in-note)) ((Info-handle-in-menu)) ((pos-visible-in-window-p (point-max)) - (if (fboundp 'Info-global-next) - (Info-global-next) - (Info-next))) + (Info-next)) ;; ;; If nothing else scroll forward a windowful. ;; @@ -138,22 +132,17 @@ or a Menu; otherwise returns nil." ;; If at end or beginning of node, go to previous node ;; ((last-line-p) - (if (fboundp 'Info-global-prev) (Info-global-prev) - (Info-prev))) - ((and (fboundp 'Info-mouse-follow-link) - (mouse-event-p assist-key-release-args) + (Info-prev)) + ((and (mouse-event-p assist-key-release-args) (let ((opoint (point))) (Info-mouse-follow-link assist-key-release-args) (/= opoint (point))))) - ((and (fboundp 'mouse-event-p) - (not (mouse-event-p assist-key-release-args)) + ((and (not (mouse-event-p assist-key-release-args)) (Info-handle-in-node-hdr-assist))) ((Info-handle-in-note)) ((Info-handle-in-menu)) ((pos-visible-in-window-p (point-min)) - (if (fboundp 'Info-global-prev) - (Info-global-prev) - (Info-prev))) + (Info-prev)) ;; ;; If anywhere else, scroll backward a windowful. ;; diff --git a/hmouse-tag.el b/hmouse-tag.el index 11a1b89d..541a601a 100644 --- a/hmouse-tag.el +++ b/hmouse-tag.el @@ -667,36 +667,36 @@ pressed in an appropriate buffer and has moved the cursor to the selected buffer." (interactive) - (unless (and (fboundp 'find-library) - ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. - (let ((opoint (point)) - type - name - lib) - (setq lib (and (search-backward "\(" nil t) - (or - ;; load with a filename - (looking-at "(\\(load\\)[ \t]+\\(\\)\"\\([^][() \t\n\r`'\"]+\\)") - ;; autoload or require with a name and filename - (looking-at "(\\(autoload\\|require\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)[ \t\n\r]+\"\\([^][() \t\n\r`'\"]+\\)") - ;; require without a separate filename - (looking-at "(\\(require\\)\\(\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)")))) - (goto-char opoint) - (when lib - (setq type (match-string-no-properties 1) - name (match-string-no-properties 2) - lib (match-string-no-properties 3)) - (hpath:display-buffer (current-buffer)) - (find-library lib) - (goto-char (point-min)) - (when (equal type "autoload") - ;; Ignore defgroup matches - (if (re-search-forward - (format "^[; \t]*(def.[^r][^ \t\n\r]*[ \t]+%s[ \t\n\r]" (regexp-quote name)) - nil t) - (goto-char (match-beginning 0)) - (error "(smart-lisp): Found autoload library but no definition for `%s'" name))) - t))) + (unless + ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. + (let ((opoint (point)) + type + name + lib) + (setq lib (and (search-backward "\(" nil t) + (or + ;; load with a filename + (looking-at "(\\(load\\)[ \t]+\\(\\)\"\\([^][() \t\n\r`'\"]+\\)") + ;; autoload or require with a name and filename + (looking-at "(\\(autoload\\|require\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)[ \t\n\r]+\"\\([^][() \t\n\r`'\"]+\\)") + ;; require without a separate filename + (looking-at "(\\(require\\)\\(\\)[ \t]+'\\([^][() \t\n\r`'\"]+\\)")))) + (goto-char opoint) + (when lib + (setq type (match-string-no-properties 1) + name (match-string-no-properties 2) + lib (match-string-no-properties 3)) + (hpath:display-buffer (current-buffer)) + (find-library lib) + (goto-char (point-min)) + (when (equal type "autoload") + ;; Ignore defgroup matches + (if (re-search-forward + (format "^[; \t]*(def.[^r][^ \t\n\r]*[ \t]+%s[ \t\n\r]" (regexp-quote name)) + nil t) + (goto-char (match-beginning 0)) + (error "(smart-lisp): Found autoload library but no definition for `%s'" name))) + t)) (smart-lisp-find-tag nil show-doc))) (defun smart-lisp-find-tag (&optional tag show-doc) @@ -726,7 +726,7 @@ Use `hpath:display-buffer' to show definition or documentation." ;; Ignore unbound symbols if displaying doc. (t nil))) - ((and elisp-flag (fboundp 'find-function-noselect) + ((and elisp-flag (let ((result (smart-lisp-bound-symbol-def tag-sym))) (when (and (cdr result) (hpath:display-buffer (car result))) @@ -1256,25 +1256,25 @@ This indicates that TAG is serving as a hyperlink button." The Lisp identifier is either listed in a tags table or is a known Emacs Lisp identifier." (interactive) - (unless (and (fboundp 'find-library) - ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. - (let ((lib) - (opoint (point))) - (setq lib (and (re-search-backward "[()]" nil t) - (looking-at (concat - "(\\(require\\|load\\|autoload\\)" - "[ \t]+.*['\"]" - "\\([^][() \t\n\r`'\"]+\\)")))) - (goto-char opoint) - (when lib - (ignore-errors (and (find-library-name lib) t))))) + (unless + ;; Handle Emacs Lisp `require', `load', and `autoload' clauses. + (let ((lib) + (opoint (point))) + (setq lib (and (re-search-backward "[()]" nil t) + (looking-at (concat + "(\\(require\\|load\\|autoload\\)" + "[ \t]+.*['\"]" + "\\([^][() \t\n\r`'\"]+\\)")))) + (goto-char opoint) + (when lib + (ignore-errors (and (find-library-name lib) t)))) ;; Cache tag value (setq hkey-value (smart-lisp-at-tag-p t)) (let* ((tag hkey-value) (tag-sym (intern-soft tag))) (cond ((and (fboundp 'ert-test-boundp) (ert-test-boundp tag-sym)) tag) - ((when (and (fboundp 'find-function-noselect) tag-sym) + ((when tag-sym (let ((result (smart-lisp-bound-symbol-def tag-sym))) (when (cdr result) tag)))) diff --git a/hproperty.el b/hproperty.el index 38b6d8d6..f74bcba8 100644 --- a/hproperty.el +++ b/hproperty.el @@ -144,11 +144,6 @@ This is shown when hovering over the button with the mouse." ;;; Public functions ;;; ************************************************************************ -;; Support NEXTSTEP and X window systems. -(and (not (fboundp 'display-color-p)) - (fboundp 'x-display-color-p) - (defalias 'display-color-p 'x-display-color-p)) - (defun hproperty:but-add (start end face) "Add a button between START and END using FACE in the current buffer. Button is added only if it does not already exist. If it does exist diff --git a/hsys-flymake.el b/hsys-flymake.el index 4873af3b..8e95f8a1 100644 --- a/hsys-flymake.el +++ b/hsys-flymake.el @@ -179,9 +179,7 @@ Issue is inserted into the buffer after the current visible line." (lambda () (when flymake-mode (define-key flymake-mode-map "\C-c" hsys-flymake-mode-control-c-prefix-map) - ;; probably Emacs 28 or greater - (when (fboundp 'repeat-mode) - (repeat-mode 1))))) + (repeat-mode 1)))) ;; If flymake-mode is already enabled, re-enable it to ensure ;; repeat-mode gets enabled. (when (and (featurep 'flymake) flymake-mode) diff --git a/htz.el b/htz.el index 736f9bf6..765bbf0b 100644 --- a/htz.el +++ b/htz.el @@ -46,8 +46,7 @@ (defvar htz:local (let ((local-tz (or (getenv "TZ") (getenv "TIMEZONE") - (if (fboundp 'current-time-zone) - (car (cdr (current-time-zone)))) + (car (cdr (current-time-zone))) (progn (require 'hypb) (hypb:call-process-p @@ -400,10 +399,9 @@ Optional argument TIMEZONE specifies a time zone." (setq timezone (or (cdr (assoc (upcase timezone) htz:world-timezones)) - (and (fboundp 'current-time-zone) - (if (listp (current-time-zone)) - (/ (car (current-time-zone)) 36) - (current-time-zone))) + (if (listp (current-time-zone)) + (/ (car (current-time-zone)) 36) + (current-time-zone)) timezone)) (if (stringp timezone) (setq timezone (string-to-number timezone))) diff --git a/hui-mouse.el b/hui-mouse.el index e0210abf..80605e17 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -256,7 +256,7 @@ The button's attributes are stored in the symbol, `hbut:current'.") . ((smart-dired-sidebar) . (smart-dired-sidebar))) ;; ;; Handle Emacs push buttons in buffers - ((and (fboundp 'button-at) (button-at (point))) + ((button-at (point)) . ((smart-push-button nil (mouse-event-p last-command-event)) . (smart-push-button-help nil (mouse-event-p last-command-event)))) ;; @@ -999,12 +999,7 @@ If key is pressed: (if (save-excursion (goto-char (point-min)) (re-search-forward "^D" nil t)) - (cond ;; For Tree-dired compatibility - ((fboundp 'dired-do-flagged-delete) - (dired-do-flagged-delete)) - ((fboundp 'dired-do-deletions) - (dired-do-deletions)) - (t (error "(smart-dired): No Dired expunge function"))))) + (dired-do-flagged-delete))) (t (hpath:find (smart-dired-pathname-up-to-point))))) ((last-line-p) (quit-window)) (t (hpath:find (or (dired-get-filename nil t) ""))))) diff --git a/hui-select.el b/hui-select.el index ae33baab..fa800f48 100644 --- a/hui-select.el +++ b/hui-select.el @@ -650,7 +650,7 @@ invoke that command instead. Typically prevents clashes over {\\`C-c' RET}, {\\`C-c´ \\`C-m'}." (interactive "p") (when interactive-flag - (cond ((and (fboundp 'use-region-p) (use-region-p)) + (cond ((use-region-p) nil) ((and transient-mark-mode mark-active) nil) diff --git a/hui-window.el b/hui-window.el index 3e861d2d..f4e3372c 100644 --- a/hui-window.el +++ b/hui-window.el @@ -302,10 +302,7 @@ and release to register a diagonal drag.") (defun assist-key-modeline-click-left-edge () "Default function run on an Assist Mouse Key click at a modeline left edge." - (if (fboundp 'last) - (switch-to-buffer (car (last (buffer-list)))) - (let ((buffers (buffer-list))) - (switch-to-buffer (nth (1- (length buffers)) buffers))))) + (switch-to-buffer (car (last (buffer-list))))) (defun action-key-modeline-click-right-edge () "Default function run on an Action Mouse Key click at a modeline right edge." @@ -813,9 +810,7 @@ Adds a window below this one. Beep and print message if the window cannot be split further." (interactive) (condition-case () - (if (fboundp 'split-window-quietly) - (split-window-quietly nil) - (split-window-vertically nil)) + (split-window-vertically nil) (error (beep) (message "(hmouse-horizontal-action-drag): Can't split the window further.")))) @@ -836,7 +831,7 @@ Beep and print message if the sole window which cannot be deleted." (setq w-or-f (frame-selected-window w-or-f))) (when (and (eq w-or-f window) (window-valid-p window)) window))) - ((fboundp 'window-edges) + (t (let* ((edges (window-edges window)) (w-xmin (nth 0 edges)) (w-ymin (nth 1 edges)) diff --git a/hui.el b/hui.el index e5f200ef..48ecd8c9 100644 --- a/hui.el +++ b/hui.el @@ -684,10 +684,9 @@ a menu to find any of the occurrences." (progn (set-buffer out-buf) (moccur-mode) - (when (fboundp 'outline-minor-mode) - (and (progn (goto-char 1) - (search-forward "\C-m" nil t)) - (outline-minor-mode 1))) + (and (progn (goto-char 1) + (search-forward "\C-m" nil t)) + (outline-minor-mode 1)) (when (fboundp 'hproperty:but-create) (hproperty:but-create (regexp-quote (if match-part diff --git a/hycontrol.el b/hycontrol.el index b050c3d2..2255b485 100644 --- a/hycontrol.el +++ b/hycontrol.el @@ -431,12 +431,8 @@ for it to be omitted by `list-buffers'." (define-key map "u" 'unbury-buffer) (define-key map "w" (lambda () (interactive) (enlarge-window-horizontally hycontrol-arg))) (define-key map "X" (lambda () (interactive) (text-scale-increase 0))) - (define-key map "Z" (lambda () (interactive) (if (fboundp 'text-scale-increase) - ;; Emacs autoloaded function - (text-scale-increase (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1)))))) - (define-key map "z" (lambda () (interactive) (if (fboundp 'text-scale-decrease) - ;; Emacs autoloaded function - (text-scale-decrease (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1)))))) + (define-key map "Z" (lambda () (interactive) (text-scale-increase (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1))))) + (define-key map "z" (lambda () (interactive) (text-scale-decrease (if (< hycontrol-arg 10) hycontrol-arg (setq hycontrol-arg 1))))) ;; Don't call these interactively because a prefix arg of 1 tries ;; to make one window 1 line tall. diff --git a/hypb.el b/hypb.el index fddfceb6..7b0ad328 100644 --- a/hypb.el +++ b/hypb.el @@ -713,17 +713,15 @@ This will this install the Emacs helm package when needed." (defun hypb:hkey-help-file () "Return the full path to the Hyperbole mouse key help file." - (cond ((and (fboundp 'locate-data-file) - (locate-data-file "hkey-help.txt"))) - (t (let* ((hypb-man (expand-file-name "man/" hyperb:dir)) - (help-file (expand-file-name "hkey-help.txt" hypb-man))) - (if (or (file-exists-p help-file) - (file-exists-p - (setq help-file (expand-file-name - "hkey-help.txt" data-directory)))) - help-file - (error "(hypb:hkey-help-file): Non-existent file: \"%s\"" - help-file)))))) + (let* ((hypb-man (expand-file-name "man/" hyperb:dir)) + (help-file (expand-file-name "hkey-help.txt" hypb-man))) + (if (or (file-exists-p help-file) + (file-exists-p + (setq help-file (expand-file-name + "hkey-help.txt" data-directory)))) + help-file + (error "(hypb:hkey-help-file): Non-existent file: \"%s\"" + help-file)))) (defvar hypb:in-string-and-tick (cons nil 0)) @@ -1384,10 +1382,8 @@ If FILE is not an absolute path, expand it relative to `hyperb:dir'." Without file, the banner is prepended to the current buffer." (let ((hyperbole-banner-path (expand-file-name "hyperbole-banner.png" hyperb:dir))) (unless (file-readable-p hyperbole-banner-path) - (setq hyperbole-banner-path (if (fboundp 'locate-data-file) - (locate-data-file "hyperbole-banner.png") - (expand-file-name "hyperbole-banner.png" - data-directory)))) + (setq hyperbole-banner-path (expand-file-name "hyperbole-banner.png" + data-directory))) (if (or (not (fboundp 'create-image)) (not (display-graphic-p)) (let ((button (next-button (point-min)))) diff --git a/hyperbole.el b/hyperbole.el index 01ecfab9..24194fa5 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -586,9 +586,7 @@ frame, those functions by default still return the prior frame." ;; Autoload this form so that when `package.el' activates Hyperbole's autoloads ;; it also sets up Kotl's autoloads. ;;;###autoload -(let ((us (if (fboundp 'macroexp-file-name) - (macroexp-file-name) - load-file-name))) +(let ((us (macroexp-file-name))) (when us ;; Contrary to the usual ELPA autoloads files, `kotl-autoloads' ;; does not add its directory to `load-path', so let's do it here diff --git a/hyrolo.el b/hyrolo.el index c3a517c2..aaec7093 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -134,7 +134,6 @@ (defvar org-link--link-folding-spec) (defvar org-roam-directory) (defvar plstore-cache-passphrase-for-symmetric-encryption) -(defvar reveal-auto-hide) ;;; ************************************************************************ ;;; Public variables @@ -377,19 +376,16 @@ With prefix argument, prompts for optional FILE to add entry within. NAME may be of the form: parent/child to insert child below a parent entry which begins with the parent string." (interactive - (progn - (unless (fboundp 'mail-fetch-field) - (require 'mail-utils)) - (let* ((lst (hyrolo-name-and-email)) - (name (car lst)) - (email (car (cdr lst))) - (entry (read-string "Name to add to rolo: " - (or name email)))) - (list (if (and email name - (string-match (concat "\\`" (regexp-quote entry)) name)) - (format hyrolo-email-format entry email) - entry) - current-prefix-arg)))) + (let* ((lst (hyrolo-name-and-email)) + (name (car lst)) + (email (car (cdr lst))) + (entry (read-string "Name to add to rolo: " + (or name email)))) + (list (if (and email name + (string-match (concat "\\`" (regexp-quote entry)) name)) + (format hyrolo-email-format entry email) + entry) + current-prefix-arg))) (when (or (not (stringp name)) (string-equal name "")) (error "(hyrolo-add): Invalid name: `%s'" name)) (when (and (called-interactively-p 'interactive) file) @@ -3634,23 +3630,6 @@ Also see the `reveal-auto-hide' variable." :keymap nil nil) ;; Make this a no-op until can debug `reveal-mode' in *HyRolo* buffer -(unless (boundp 'reveal-auto-hide) -(defcustom reveal-auto-hide t - "Automatically hide revealed text when leaving it. -If nil, the `reveal-hide-revealed' command can be useful to hide -revealed text manually." - :type 'boolean - :version "28.1")) - -(unless (fboundp 'reveal-hide-revealed) -(defun reveal-hide-revealed () - "Hide all revealed text. -If there is revealed text under point, this command does not hide -that text." - (interactive) - (let ((reveal-auto-hide t)) - (reveal-post-command)))) - (defun hyrolo-reveal-open-new-overlays (old-ols) (let ((repeat t)) (while repeat