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

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

[elpa] externals/hyperbole 0be859206b 2/2: Simplify calling (hact 'hsys-


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 0be859206b 2/2: Simplify calling (hact 'hsys-org-meta-return)
Date: Sun, 22 May 2022 17:57:39 -0400 (EDT)

branch: externals/hyperbole
commit 0be859206b48fb3f7e0c62368db2a5dbc6085a54
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    Simplify calling (hact 'hsys-org-meta-return)
---
 ChangeLog               |  3 +++
 hsys-org.el             | 10 +++++-----
 hui-mouse.el            | 10 +++++-----
 test/smart-org-tests.el |  8 ++++----
 4 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 54b1ae0881..cbb63a2e03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2022-05-22  Bob Weiner  <rsw@gnu.org>
 
+* hsys-org.el (hsys-org-meta-return): Remove optional ARG and just use value 
of current-prefix-arg
+     to simplify (hact 'hsys-org-meta-return) calls.
+
 * hpath.el (hpath:internal-display-alist): Fix so Info files with non-absolute
     directories outside of the 'Info-directory-list' are resolved properly,
     e.g. "man/hyperbole.info".
diff --git a/hsys-org.el b/hsys-org.el
index 289b278e4d..10e0409d08 100644
--- a/hsys-org.el
+++ b/hsys-org.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:     2-Jul-16 at 14:54:14
-;; Last-Mod:     22-May-22 at 13:08:54 by Bob Weiner
+;; Last-Mod:     22-May-22 at 15:05:49 by Bob Weiner
 ;;
 ;; Copyright (C) 2016-2021  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -46,11 +46,11 @@
       t)))
 
 ;;;###autoload
-(defun hsys-org-meta-return (&optional arg)
-  "Call `org-meta-return' with the numeric value of any prefix ARG when given."
+(defun hsys-org-meta-return ()
+  "Call `org-meta-return' with the numeric value of any prefix arg when given."
   (interactive "P")
-  (if arg
-      (org-meta-return (prefix-numeric-value arg))
+  (if current-prefix-arg
+      (org-meta-return (prefix-numeric-value current-prefix-arg))
     (org-meta-return)))
 
 ;;;###autoload
diff --git a/hui-mouse.el b/hui-mouse.el
index 2b982dcbeb..f8be5b08b6 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    04-Feb-89
-;; Last-Mod:     22-May-22 at 13:04:43 by Bob Weiner
+;; Last-Mod:     22-May-22 at 15:05:45 by Bob Weiner
 ;;
 ;; Copyright (C) 1991-2022  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -60,14 +60,14 @@
   "If in Org mode and Hyperbole shares {M-RET}, run org-meta-return, else 
signal an error."
   (if (and (funcall hsys-org-mode-function)
           (hsys-org-meta-return-shared-p))
-      (hact 'hsys-org-meta-return 'current-prefix-arg)
+      (hact 'hsys-org-meta-return)
     (hypb:error "(Hyperbole Action Key): No action defined for this context; 
try another location")))
 
 (defun assist-key-error ()
   "If in Org mode and Hyperbole shares {M-RET}, run org-meta-return, else 
signal an error."
   (if (and (funcall hsys-org-mode-function)
           (hsys-org-meta-return-shared-p))
-      (hact 'hsys-org-meta-return 'current-prefix-arg)
+      (hact 'hsys-org-meta-return)
     (hypb:error "(Hyperbole Assist Key): No action defined for this context; 
try another location")))
 
 (defcustom action-key-default-function #'action-key-error
@@ -1659,7 +1659,7 @@ handled by the separate implicit button type, 
`org-link-outside-org-mode'."
     (let (start-end)
       (cond ((not hsys-org-enable-smart-keys)
             (when (hsys-org-meta-return-shared-p)
-              (hact 'hsys-org-meta-return 'current-prefix-arg))
+              (hact 'hsys-org-meta-return))
             ;; Ignore any further Smart Key non-Org contexts
             t)
            ((eq hsys-org-enable-smart-keys t)
@@ -1719,7 +1719,7 @@ handled by the separate implicit button type, 
`org-link-outside-org-mode'."
                    nil)
                   (t
                    (when (hsys-org-meta-return-shared-p)
-                     (hact 'hsys-org-meta-return 'current-prefix-arg))
+                     (hact 'hsys-org-meta-return))
                    ;; Ignore any further Smart Key non-Org contexts
                    t)))
            (t
diff --git a/test/smart-org-tests.el b/test/smart-org-tests.el
index 60a59ce6ca..8a1f135d55 100644
--- a/test/smart-org-tests.el
+++ b/test/smart-org-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell <matsl@gnu.org>
 ;;
 ;; Orig-Date:    23-Apr-21 at 22:21:00
-;; Last-Mod:     22-May-22 at 13:44:31 by Bob Weiner
+;; Last-Mod:     22-May-22 at 15:04:44 by Bob Weiner
 ;;
 ;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -93,7 +93,7 @@
       (insert "(hy per bo le)\n")
       (goto-char 14)
       (with-mock
-       (mock (hsys-org-meta-return nil) => t)
+       (mock (hsys-org-meta-return) => t)
        (smart-org)))))
 
 ;; Org Link
@@ -130,7 +130,7 @@
       (insert "/tmp")
       (goto-char 1)
       (with-mock
-       (mock (hsys-org-meta-return nil) => t)
+       (mock (hsys-org-meta-return) => t)
        (smart-org)))))
 
 ;; Org Link
@@ -142,7 +142,7 @@
       (insert "[[/tmp][desc]]")
       (goto-char 9)
       (with-mock
-       (mock (hsys-org-meta-return nil) => t)
+       (mock (hsys-org-meta-return) => t)
        (smart-org)))))
 
 ;; Compilation requires `el-mock' which is not `Package-Require'd.



reply via email to

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