emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/srht 0db1310218 09/27: Downgrade Emacs requirements to


From: ELPA Syncer
Subject: [elpa] externals/srht 0db1310218 09/27: Downgrade Emacs requirements to 27.1.
Date: Tue, 17 May 2022 22:57:59 -0400 (EDT)

branch: externals/srht
commit 0db131021857d83c293999f4c2b3727051b86bb1
Author: Aleksandr Vityazev <avityazev@posteo.org>
Commit: Aleksandr Vityazev <avityazev@posteo.org>

    Downgrade Emacs requirements to 27.1.
---
 lisp/srht-paste.el | 18 +++++++++++++++++-
 lisp/srht-pkg.el   |  2 +-
 lisp/srht.el       |  2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/lisp/srht-paste.el b/lisp/srht-paste.el
index 82b89a91aa..c7365e0959 100644
--- a/lisp/srht-paste.el
+++ b/lisp/srht-paste.el
@@ -103,9 +103,25 @@ the whole buffer."
       (buffer-substring-no-properties (region-beginning) (region-end))
     (buffer-string)))
 
+(defalias 'srht-paste-file-name-concat
+  (if (fboundp 'file-name-concat)
+      #'file-name-concat
+    (lambda (directory &rest components)
+      (let ((components (cl-remove-if (lambda (el)
+                                        (or (null el) (equal "" el)))
+                                      components))
+            file-name-handler-alist)
+        (if (null components)
+            directory
+          (apply #'srht-paste-file-name-concat
+                 (concat (unless (or (equal "" directory) (null directory))
+                           (file-name-as-directory directory))
+                         (car components))
+                 (cdr components)))))))
+
 (defun srht-paste--kill-link (name sha)
   "Make URL constructed from NAME and SHA the latest kill in the kill ring."
-  (kill-new (file-name-concat (srht--make-uri 'paste nil nil) name sha))
+  (kill-new (srht-paste-file-name-concat (srht--make-uri 'paste nil nil) name 
sha))
   (message "Paste URL in kill-ring"))
 
 (defun srht-paste--else (plz-error)
diff --git a/lisp/srht-pkg.el b/lisp/srht-pkg.el
index 549c9c768e..17f71d54ad 100644
--- a/lisp/srht-pkg.el
+++ b/lisp/srht-pkg.el
@@ -3,7 +3,7 @@
   "srht"
   "0.1.0"
   "Sourcehut"
-  '((emacs "28.1") (plz "0.1-pre"))
+  '((emacs "27.1") (plz "0.1-pre"))
   :authors '(("Aleksandr Vityazev" . "avityazev@posteo.org"))
   :maintainer '("Aleksandr Vityazev" . "avityazev@posteo.org")
   :keywords '("comm"))
diff --git a/lisp/srht.el b/lisp/srht.el
index 0287bb40b6..c27309a97a 100644
--- a/lisp/srht.el
+++ b/lisp/srht.el
@@ -7,7 +7,7 @@
 ;; Package-Version: 0.1.0
 ;; Homepage: https://sr.ht/~akagi/srht.el/
 ;; Keywords: comm
-;; Package-Requires: ((emacs "28.1") (plz "0.1-pre"))
+;; Package-Requires: ((emacs "27.1") (plz "0.1-pre"))
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by



reply via email to

[Prev in Thread] Current Thread [Next in Thread]