summaryrefslogtreecommitdiff
path: root/lisp/ffap.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-07-27 23:21:28 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-07-27 23:21:28 +0200
commitfaa007cebf4a50bc2f21f59fea1e0f0064948f84 (patch)
tree54cadad4613044a8277d24afc85daaba963ab9fb /lisp/ffap.el
parent00897b63694069b0f2fb152fa74333c6f6418fc5 (diff)
downloademacs-faa007cebf4a50bc2f21f59fea1e0f0064948f84.tar.gz
Make ffap-file-suffix obsolete
* lisp/ffap.el (ffap-file-suffix): Make obsolete in favor of file-name-extension. Update callers.
Diffstat (limited to 'lisp/ffap.el')
-rw-r--r--lisp/ffap.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 9de0dd40d16..a6cb01a93b1 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -505,6 +505,7 @@ Returned values:
(defun ffap-file-suffix (file)
"Return trailing `.foo' suffix of FILE, or nil if none."
+ (declare (obsolete file-name-extension "29.1"))
(let ((pos (string-match "\\.[^./]*\\'" file)))
(and pos (substring file pos nil))))
@@ -528,7 +529,7 @@ The optional NOMODIFY argument suppresses the extra search."
;; three reasons to suppress search:
(nomodify nil)
((not (rassq 'jka-compr-handler file-name-handler-alist)) nil)
- ((member (ffap-file-suffix file) ffap-compression-suffixes) nil)
+ ((member (file-name-extension file t) ffap-compression-suffixes) nil)
(t ; ok, do the search
(let ((list ffap-compression-suffixes) try ret)
(while list