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

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

[elpa] externals/hyperbole dd63d76 2/2: smart-org - Fix to support Hyper


From: ELPA Syncer
Subject: [elpa] externals/hyperbole dd63d76 2/2: smart-org - Fix to support Hyperbole EOL handling
Date: Sun, 2 May 2021 17:57:15 -0400 (EDT)

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

    smart-org - Fix to support Hyperbole EOL handling
    
    Change 'Assumes' to 'Assume' in many docstrings.
---
 ChangeLog     |  5 +++++
 hbut.el       |  2 +-
 hsys-org.el   | 14 ++++++++++----
 hui-mouse.el  | 12 ++++++++----
 hui-select.el |  2 +-
 hyrolo.el     |  2 +-
 kotl/kfile.el |  6 +++---
 set.el        |  8 ++++----
 8 files changed, 33 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cb21438..67d184f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,11 @@
   hib-org.el: Move remaining action types to hsys-org.el and delete
     this file.
   test/hib-org-tests.el: Rename to test/smart-org-tests.el.
+  hui-mouse.el (action-key-error, assist-key-error): When in Org mode,
+    if no other context fired, use org-meta-return.
+  hsys-org.el (hsys-org-heading-at-p): Add to support Hyperbole
+    EOL handling and use in smart-org.
+
 
 * kotl/kotl-mode.el (kotl-mode:kill-whole-line): Add override
     of kill-whole-line for Koutliner.
diff --git a/hbut.el b/hbut.el
index 9335878..a59125d 100644
--- a/hbut.el
+++ b/hbut.el
@@ -174,7 +174,7 @@ Return nil if no matching button is found."
   "Return key for the Hyperbole explicit button label that point is within, 
else nil.
 This is the normalized key form of the explicit button's label.
 
-Assumes point is within the first line of any button label.  All
+Assume point is within the first line of any button label.  All
 following arguments are optional.  If AS-LABEL is non-nil, label
 is returned rather than the key derived from the label.
 START-DELIM and END-DELIM are strings that override default
diff --git a/hsys-org.el b/hsys-org.el
index 77a8a5a..0a1e178 100644
--- a/hsys-org.el
+++ b/hsys-org.el
@@ -155,7 +155,7 @@ uses that one.  Otherwise, triggers an error."
 
 (defun hsys-org-link-at-p ()
   "Return non-nil iff point is on an Org mode link.
-Assumes caller has already checked that the current buffer is in `org-mode'
+Assume caller has already checked that the current buffer is in `org-mode'
 or are looking for an Org link in another buffer type."
   (or (and (boundp 'org-link-bracket-re)
           (org-in-regexp org-link-bracket-re))
@@ -165,10 +165,16 @@ or are looking for an Org link in another buffer type."
            (not (null org-target-link-regexp))
            (org-in-regexp org-target-link-regexp))))
 
-;; Assumes caller has already checked that the current buffer is in org-mode.
+;; Assume caller has already checked that the current buffer is in org-mode.
+(defun hsys-org-heading-at-p (&optional _)
+  "Non-nil when on a headline."
+  (unless (eolp)
+    (outline-on-heading-p t)))
+
+;; Assume caller has already checked that the current buffer is in org-mode.
 (defun hsys-org-target-at-p ()
-  "Return non-nil iff point is on an Org mode radio target (definition) or 
link target (referent).
-Assumes caller has already checked that the current buffer is in `org-mode'."
+  "Return non-nil iff point is on an Org mode radio target (definition) or 
radio target link (referent).
+Assume caller has already checked that the current buffer is in `org-mode'."
   (hsys-org-face-at-p 'org-target))
 
 (defun hsys-org-radio-target-link-at-p ()
diff --git a/hui-mouse.el b/hui-mouse.el
index f4dfc02..c9b9e10 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -992,7 +992,7 @@ If assist-key is pressed within:
 
 (defun smart-helm-line-has-action ()
   "Mark and return the actions for the helm selection item at the point of 
Action Key depress, or nil if line lacks any action.
-Assumes Hyperbole has already checked that helm is active."
+Assume Hyperbole has already checked that helm is active."
   (let ((helm-buffer (if (equal helm-action-buffer (buffer-name)) helm-buffer 
(buffer-name))))
     (save-excursion
       (with-helm-buffer
@@ -1027,7 +1027,7 @@ Assumes Hyperbole has already checked that helm is 
active."
   "Return non-nil iff Smart Mouse DEPRESS-EVENT was on a helm section header, 
candidate separator or at eob or eol.
 If non-nil, returns a property list of the form: (section-header <bool> 
separator <bool> eob <bool> or eol <bool>).
 If a section-header or separator, selects the first following candidate line.
-Assumes Hyperbole has already checked that helm is active."
+Assume Hyperbole has already checked that helm is active."
   (and (eventp depress-event)
        ;; Nil means in the buffer text area
        (not (posn-area (event-start depress-event)))
@@ -1629,7 +1629,7 @@ handled by the separate implicit button type, 
`org-link-outside-org-mode'."
                      (hact 'hkey-help))
                    ;; Ignore any further Smart Key non-Org contexts
                    t)
-                  ((org-at-heading-p)
+                  ((hsys-org-heading-at-p)
                    (if (not assist-flag)
                        (hact 'hsys-org-cycle)
                      (hact 'hsys-org-global-cycle))
@@ -1638,6 +1638,11 @@ handled by the separate implicit button type, 
`org-link-outside-org-mode'."
                    ;; Continue with any further Smart Key non-Org contexts
                    nil))))
          ((eq hsys-org-enable-smart-keys 'buttons)
+          (when (hbut:at-p)
+            ;; Activate/Assist with any Hyperbole button at point
+            (if (not assist-flag)
+                (hact 'hbut:act)
+              (hact 'hkey-help)))
           ;; Ignore any further Smart Key non-Org contexts
           t)
          (t
@@ -1645,7 +1650,6 @@ handled by the separate implicit button type, 
`org-link-outside-org-mode'."
           ;; contexts
           nil))))
 
-
 ;;; ************************************************************************
 ;;; smart-outline functions
 ;;; ************************************************************************
diff --git a/hui-select.el b/hui-select.el
index 9c9e485..564bb7f 100644
--- a/hui-select.el
+++ b/hui-select.el
@@ -674,7 +674,7 @@ Return t if marked, nil otherwise.  If any error occurs 
such as
 
 (defun hui-select-at-blank-line-or-comment ()
   "Return non-nil if on a blank line or a comment start or end line.
-Assumes point is before any non-whitespace character on the line."
+Assume point is before any non-whitespace character on the line."
   (let ((comment-end-p (and (stringp comment-end)
                            (not (string-equal comment-end "")))))
     (if (looking-at
diff --git a/hyrolo.el b/hyrolo.el
index 92258b6..13ec6ac 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -619,7 +619,7 @@ XEmacs only."
 ;;;###autoload
 (defun hyrolo-sort (&optional hyrolo-file)
   "Sort up to 14 levels of entries in HYROLO-FILE (default is personal rolo).
-Assumes entries are delimited by one or more `*'characters.
+Assume entries are delimited by one or more `*'characters.
 Return list of number of groupings at each entry level."
   (interactive
    (list (let ((default "")
diff --git a/kotl/kfile.el b/kotl/kfile.el
index 89be15b..80b8ab0 100644
--- a/kotl/kfile.el
+++ b/kotl/kfile.el
@@ -356,7 +356,7 @@ VISIBLE-ONLY-P is non-nil.  Signal an error if kotl is not 
attached to a file."
 
 (defun kfile:build-structure-v2 (kotl-structure cell-data)
   "Build cell list from the KOTL-STRUCTURE and its CELL-DATA.
-Assumes all arguments are valid.  CELL-DATA is a vector of cell fields read
+Assume all arguments are valid.  CELL-DATA is a vector of cell fields read
 from a koutline file.
 
 Return list of outline cells in depth first order.  Invisible top cell is not
@@ -386,7 +386,7 @@ included in the list."
 
 (defun kfile:insert-attributes-v2 (kview kcell-list)
   "Set cell attributes within KVIEW for each element in KCELL-LIST.
-Assumes all cell contents are already in kview and that no cells are
+Assume all cell contents are already in kview and that no cells are
 hidden."
   (let (buffer-read-only)
     (while
@@ -404,7 +404,7 @@ hidden."
 
 (defun kfile:insert-attributes-v3 (kview kcell-vector)
   "Set cell attributes within KVIEW for each element in KCELL-VECTOR.
-Assumes all cell contents are already in kview and that no cells are
+Assume all cell contents are already in kview and that no cells are
 hidden."
   (let ((kcell-num 1)
        (buffer-read-only))
diff --git a/set.el b/set.el
index c164964..2045ecb 100644
--- a/set.el
+++ b/set.el
@@ -69,7 +69,7 @@ Use (setq set (set:remove elt set)) to assure set is always 
properly modified."
 
 (defun set:combinations (set &optional arity)
   "Return all possible combinations (subsets) of SET including the empty set 
and the SET itself.
-Assumes SET is a valid set.  With optional ARITY, return only subsets with
+Assume SET is a valid set.  With optional ARITY, return only subsets with
 ARITY members."
   (cond ((null arity) 
         (setq arity 0)
@@ -126,7 +126,7 @@ Uses `set:equal-op' for comparison."
 
 (defun set:get (key set)
   "Return the value associated with KEY in SET or nil.
-Assumes elements of SET are of the form (key . value)."
+Assume elements of SET are of the form (key . value)."
   (cdr (car (let ((set:equal-op (lambda (key elt) (equal key (car elt)))))
              (set:member key set)))))
 
@@ -164,8 +164,8 @@ Uses `set:equal-op' for comparison.  See also `set:create'."
 Return set if modified, else nil.
 Use (setq set (set:replace elt set)) to assure set is always properly modified.
 
-Uses `set:equal-op' to match against KEY.  Assumes each element in the set
-has a car and a cdr."
+Use `set:equal-op' to match against KEY.  Assume each element in the set has a
+car and a cdr."
   (let ((elt-set (set:member key set)))
     (if elt-set
        ;; replace element



reply via email to

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