[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/base32 5557b7714a 091/103: Squash obsolete function warnin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/base32 5557b7714a 091/103: Squash obsolete function warnings, maintain backwards compatibility |
Date: |
Sat, 10 Feb 2024 13:00:13 -0500 (EST) |
branch: elpa/base32
commit 5557b7714a16651875557250dff1a6b2ffc397cf
Author: Vivek Das Mohapatra <vivek@collabora.co.uk>
Commit: Vivek Das Mohapatra <vivek@collabora.co.uk>
Squash obsolete function warnings, maintain backwards compatibility
---
totp-auth-interop.el | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/totp-auth-interop.el b/totp-auth-interop.el
index a66d8c4ad5..f65ca5c63a 100644
--- a/totp-auth-interop.el
+++ b/totp-auth-interop.el
@@ -16,6 +16,13 @@
(locate-library "hmac")))
(add-to-list 'load-path (file-name-directory this-file)))
(require 'totp-auth))
+ ;; function declared obsolete in 29.x
+ ;; do not use #' forms here as that will trigger a different warning
+ (if (fboundp 'image-supported-file-p)
+ (defalias 'totp-auth-image-type-from-filename
+ 'image-supported-file-p)
+ (defalias 'totp-auth-image-type-from-filename
+ 'image-type-from-file-name))
(require 'mailcap))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -474,7 +481,7 @@ has no entry at all."
"Export OTP secrets to FILE as image format IMG-TYPE.
FILE is a path to a file which may or may not exist yet.
IMG-TYPE is a symbol representingh an image type.
-\(see ‘image-type-from-file-name’ for details).
+\(see ‘totp-auth-image-type-from-filename’ for details).
FILE should match IMG-TYPEs well known extension but this is not enforced.
TYPE is :otpauth or :otpauth-migration, and defaults to :otpauth.
SECRETS is a list of ‘totp-auth-unwrap-otp-blob’ secrets, or nil for all.
@@ -504,7 +511,9 @@ of ‘totp-auth-file-export-type-map’."
args (mapcar (lambda (a)
(if (equal "@file@" a) file a))
arg-list))
- (apply #'call-process-region (point-at-bol) (point-at-eol)
+ (apply #'call-process-region
+ (line-beginning-position)
+ (line-end-position)
cmd nil t nil args)
(setq created (list file)))
(t
@@ -516,7 +525,9 @@ of ‘totp-auth-file-export-type-map’."
args (mapcar (lambda (a)
(if (equal "@file@" a) nth-file a))
arg-list))
- (apply #'call-process-region (point-at-bol) (point-at-eol)
+ (apply #'call-process-region
+ (line-beginning-position)
+ (line-end-position)
cmd nil t nil args)
(setq created (cons nth-file created)
travel (forward-line)
@@ -556,7 +567,7 @@ If it is nil, all available secrets are exported."
"Export TOTP SECRETS to FILE.
FILE is a destination file.
If it matches ‘epa-file-name-regexp’ then a text file is saved.
-If ‘image-type-from-file-name’ returns an image type for file then
+If ‘totp-auth-image-type-from-filename’ returns an image type for file then
a QR code is generated instead.
TYPE may be :otpauth-migration or :otpauth - which URL scheme to use.
\nSECRETS is a list of ‘totp-auth-unwrap-otp-blob’ secrets, or a string, or
nil.
@@ -576,7 +587,7 @@ Any other string is used as a substring to look for in the
labels."
(error "Export file %S already exists" file))
(let (img-type epa-ok)
(setq epa-ok (string-match epa-file-name-regexp file)
- img-type (image-type-from-file-name file))
+ img-type (totp-auth-image-type-from-filename file))
(cond (epa-ok (totp-auth-export-text file type secrets))
(img-type (totp-auth-export-image file img-type type secrets))
(t (error "%S is not an EPA file or supported image format" file)))))
- [nongnu] elpa/base32 da1498e54d 102/103: Handle empty user strings better when creating labels for secrets, (continued)
- [nongnu] elpa/base32 da1498e54d 102/103: Handle empty user strings better when creating labels for secrets, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 d550a728be 066/103: Rename totp-interop.el to totp-auth-interop.el, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 908d2d6aea 076/103: Fix overlong docstring line, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 33a93352a9 086/103: Trivia: docstring symbol markup converted to new style, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 99a81b3634 034/103: Trying out name diversion on packaging as totp is taken., ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 a97fde3c60 061/103: Prepare to ship base32 as a separate package, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 18c813779a 064/103: Mention Google Authenticator in comments, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 046998aa35 095/103: Automate byte compilation & running tests with no site or user config, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 ccf4584caa 041/103: totp-update-token-display: fix intermitten token display bug, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 d3696bbe2d 047/103: Squash a deprecated function byte-compile warning, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 5557b7714a 091/103: Squash obsolete function warnings, maintain backwards compatibility,
ELPA Syncer <=
- [nongnu] elpa/base32 50609c4c9b 092/103: Typo in error message, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 3ede350d0f 040/103: totp-auto-copy-password: change the default value, ELPA Syncer, 2024/02/10