From: Stefan Kangas Date: Wed, 27 Jul 2022 21:21:28 +0000 (+0200) Subject: Make ffap-file-suffix obsolete X-Git-Tag: emacs-29.0.90~1447^2~715 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=faa007cebf4a50bc2f21f59fea1e0f0064948f84;p=emacs.git Make ffap-file-suffix obsolete * lisp/ffap.el (ffap-file-suffix): Make obsolete in favor of file-name-extension. Update callers. --- 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