branch: master
commit b13820c6bd44822db5b8ce369d4f624f0f8bbda2
Merge: 9aad8f1 9840511
Author: Stephen Leake <stephen_le...@stephe-leake.org>
Commit: Stephen Leake <stephen_le...@stephe-leake.org>

    Merge commit '98405112baa5ce2a118d1c65184c005d8ddaa1a9'
---
 admin/archive-contents.el | 10 ++++++----
 externals-list            |  1 +
 packages/xclip/xclip.el   | 16 ++++++++++++++++
 3 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 32f5285..3024543 100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -41,8 +41,10 @@
       l)))
 
 (defun archive--convert-require (elt)
-  (list (car elt)
-       (archive--version-to-list (car (cdr elt)))))
+  (let ((vers (archive--version-to-list (car (cdr elt)))))
+    (if vers
+        (list (car elt) vers)
+      (list (car elt)))))
 
 (defun archive--dirname (dir &optional base)
   (file-name-as-directory (expand-file-name dir base)))
@@ -200,7 +202,7 @@ PKG is the name of the package and DIR is the directory 
where it is."
                           (format archive-default-url-format pkg)))
                  (req
                   (and requires-str
-                       (mapcar 'archive--convert-require
+                       (mapcar #'archive--convert-require
                                (car (read-from-string requires-str))))))
             (list simple version description req
                   ;; extra parameters
@@ -292,7 +294,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
   (let* ((exp (archive--multi-file-package-def dir pkg))
         (vers (nth 2 exp))
          (req-exp (nth 4 exp))
-        (req (mapcar 'archive--convert-require
+        (req (mapcar #'archive--convert-require
                       (if (eq 'quote (car-safe req-exp)) (nth 1 req-exp)
                         (when req-exp
                           (error "REQ should be a quoted constant: %S"
diff --git a/externals-list b/externals-list
index 52019c2..cedce15 100644
--- a/externals-list
+++ b/externals-list
@@ -82,6 +82,7 @@
  ("f90-interface-browser" :subtree "https://github.com/wence-/f90-iface";)
  ("flymake"            :core "lisp/progmodes/flymake.el")
  ("fountain-mode"      :external "https://github.com/rnkn/fountain-mode";)
+ ("frog-menu" :external "https://github.com/clemera/frog-menu";)
  ("ggtags"             :subtree "https://github.com/leoliu/ggtags";)
  ("gnome-c-style"      :subtree "https://github.com/ueno/gnome-c-style.git";)
  ("gnorb"               :subtree "https://github.com/girzel/gnorb";)
diff --git a/packages/xclip/xclip.el b/packages/xclip/xclip.el
index 6302ff9..2c7be8c 100644
--- a/packages/xclip/xclip.el
+++ b/packages/xclip/xclip.el
@@ -74,6 +74,7 @@ If non-nil `xclip-program' is ignored.")
    (and (eq system-type 'cygwin) (executable-find "getclip") 'getclip)
    (and (executable-find "xclip") 'xclip)
    (and (executable-find "xsel") 'xsel)
+   (and (executable-find "wl-copy") 'wl-copy) ;github.com/bugaevc/wl-clipboard
    (and (fboundp 'x-create-frame) (getenv "DISPLAY") 'emacs)
    'xclip)
   "Method to use to access the GUI's clipboard.
@@ -84,6 +85,7 @@ and `getclip' under Cygwin, or `emacs' to use Emacs's GUI 
code for that."
           (const :tag "Cygwin: getclip/putclip" getclip)
           (const :tag "X11: xclip" xclip)
           (const :tag "X11: xsel" xsel)
+          (const :tag "Wayland: wl-copy" wl-copy)
           (const :tag "X11: Emacs" emacs)))
 
 (defcustom xclip-program (symbol-name xclip-method)
@@ -128,6 +130,12 @@ See also `x-set-selection'."
                  (start-process
                   "xsel" nil xclip-program
                   "-i" (concat "--" (downcase (symbol-name type))))))
+              (`wl-copy
+               (when (and (getenv "WAYLAND_DISPLAY")
+                          (memq type '(clipboard CLIPBOARD primary PRIMARY)))
+                 (apply #'start-process
+                        "wl-copy" nil xclip-program
+                        (if (memq type '(primary PRIMARY)) '("-p")))))
               (method (error "Unknown `xclip-method': %S" method)))))
       (when proc
         (process-send-string proc data)
@@ -160,6 +168,14 @@ See also `x-set-selection'."
                                  secondary SECONDARY)))
            (call-process xclip-program nil standard-output nil
                          "-o" (concat "--" (downcase (symbol-name type))))))
+        (`wl-copy
+         (when (and (getenv "WAYLAND_DISPLAY")
+                    (memq type '(clipboard CLIPBOARD primary PRIMARY)))
+           (apply #'call-process
+                  (replace-regexp-in-string "\\(.*\\)copy" "\\1paste"
+                                            xclip-program 'fixedcase)
+                  nil standard-output nil
+                  (if (memq type '(primary PRIMARY)) '("-p")))))
         (method (error "Unknown `xclip-method': %S" method))))))
 
 ;;;###autoload

Reply via email to