Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
60aa222
Remove defalias of display-color-p
matsl Mar 18, 2026
eee4fa5
Use repeat-mode, defined since Emacs 28.1
matsl Mar 18, 2026
e073188
Use button-at, defined in Emacs before version 28
matsl Mar 18, 2026
b9dd03d
Use macroexp-file-name, defined since Emacs 28.1
matsl Mar 18, 2026
0b7d149
Use dired-do-flagged-delete, defined since before Emacs 28
matsl Mar 18, 2026
54bb0da
Use current-time-zone, defined in Emacs 25.1
matsl Mar 18, 2026
a3a13ed
Use last, defined before Emacs 28
matsl Mar 18, 2026
4831241
Use make-directory, defined since Emacs 19.34
matsl Mar 18, 2026
6c63a5a
Always use split-window-vertically
matsl Mar 18, 2026
3d648fa
Remove XEmacs functions, don't check for Emacs functions
matsl Mar 18, 2026
0ebdad1
Use window-edges
matsl Mar 18, 2026
42c162a
Use text-scale-increase and text-scale-decrease
matsl Mar 18, 2026
5c5d751
Use use-region-p, defined since Emacs 23.1
matsl Mar 18, 2026
bc686ba
locate-data-file is not an Emacs function
matsl Mar 18, 2026
fd04e97
Do not use none Emacs functions
matsl Mar 18, 2026
1838391
Use vc-print-root-log, defined since Emacs 24.1
matsl Mar 18, 2026
7b0c451
Use locate-dominating-file, defined before Emacs 28
matsl Mar 18, 2026
3f4f76e
Use get-text-property and gnus-article-press-button
matsl Mar 18, 2026
fcaa51f
Use outline-minor-mode, defined since Emacs 19.1
matsl Mar 18, 2026
81ad41f
Use mouse-drag-frame-move, defined since Emacs 28
matsl Mar 18, 2026
c033397
Use frame-list-z-order, defined since Emacs 26.1
matsl Mar 18, 2026
4ad4320
Use find-library, defined since Emacs 25.2
matsl Mar 18, 2026
454116e
Use find-function-noselect, defined before Emacs 28
matsl Mar 18, 2026
5d76de3
Use reveal-hide-revealed, defined since Emacs 28.1
matsl Mar 19, 2026
e5410e0
Use reveal-auto-hide, defined since Emacs 28.1
matsl Mar 19, 2026
6fdda28
locate-data-file is not an Emacs function
matsl Mar 19, 2026
57769b4
Use mail-fetch-field, defined before Emacs 28
matsl Mar 19, 2026
5e429e7
Review comment, keep check for gnus-article-press-button
matsl Mar 29, 2026
bd7a995
Add ChanegLog
matsl Mar 29, 2026
bed96c4
Review comment, remove empty lines in ChangeLog
matsl Mar 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
2026-03-29 Mats Lidell <matsl@gnu.org>

* 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 <rsw@gnu.org>

* hypb.el (hypb:sqlite-p): Add to return non-nil when Emacs supports sqlite.
Expand Down
12 changes: 4 additions & 8 deletions hact.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
5 changes: 2 additions & 3 deletions hib-social.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions hibtypes.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
4 changes: 1 addition & 3 deletions hinit.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
7 changes: 3 additions & 4 deletions hmoccur.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 2 additions & 6 deletions hmouse-drv.el
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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
Expand Down
27 changes: 8 additions & 19 deletions hmouse-info.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.
;;
Expand Down Expand Up @@ -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.
;;
Expand Down
88 changes: 44 additions & 44 deletions hmouse-tag.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)))
Expand Down Expand Up @@ -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))))
Expand Down
5 changes: 0 additions & 5 deletions hproperty.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions hsys-flymake.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 4 additions & 6 deletions htz.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)))
Expand Down
9 changes: 2 additions & 7 deletions hui-mouse.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
;;
Expand Down Expand Up @@ -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) "")))))
Expand Down
Loading