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

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

[elpa] externals/hyperbole c5dbb88 5/6: Bunch of fixes and improvements


From: ELPA Syncer
Subject: [elpa] externals/hyperbole c5dbb88 5/6: Bunch of fixes and improvements in prep for next release
Date: Mon, 19 Apr 2021 00:57:09 -0400 (EDT)

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

    Bunch of fixes and improvements in prep for next release
---
 Changes       | 38 ++++++++++++++++++++++-
 hmouse-drv.el | 42 +++++++++++++++-----------
 hpath.el      | 97 +++++++++++++++++++++++++++++++++--------------------------
 hui-mouse.el  | 59 +++++++++++++++++++++++++++++++++++-
 hui-window.el | 33 +++++++++++---------
 hui.el        |  4 +--
 6 files changed, 194 insertions(+), 79 deletions(-)

diff --git a/Changes b/Changes
index adc3966..cf21e2a 100644
--- a/Changes
+++ b/Changes
@@ -1,8 +1,44 @@
+2021-04-19  Bob Weiner  <rsw@gnu.org>
+
+* README.md, README.md.html, INSTALL: Update Hyperbole activation instruction 
to use
+   (hyperbole-mode 1).
+
+* hpath.el (hpath:substitute-dir): Remove hpath:validate calls, allowing 
non-existent
+    filenames; validate elsewhere.  This resolves improper replication of final
+    part of a path, e.g. file/file.
+
 2021-04-18  Bob Weiner  <rsw@gnu.org>
 
+* kotl/MANIFEST: Add kotl-orgtbl.el and add copyright and documentation to 
that file.
+
+* hui-window.el (hmouse-alist): Move minibuffer click handler to after drags 
so can drag
+    from minibuffer to another window as an action if desired.
+  hui-mouse.el  (hkey-alist, smart-custom, smart-custom-assist): ivy-mode, 
Custom-mode
+    - Add Action/Assist Mouse and Key support for these modes.
+
+* test/hibtypes-tests.el (ibtypes::pathname-with-dash-loads-file-test): Remove 
expected
+    failure as this has been resolved.
+
+* hui.el (hui:ebut-modify): Fix bug attempting to use loc attribute before it 
was set.
+    Set this earlier in the function, separate from other attributes.
+
+* hpath.el (hpath:at-p): Moved remote path handling to lower priority than 
PATH variable
+    value handling; helps prevent false positives for remote paths.
+
+* DEMO (Implicit Buttons): Add Table of Contents to long Implicit Buttons 
section.
+
+* hmouse-drv.el (hkey-insert-region): Improve errors and allow for throwing 
regions within a
+    single buffer as long as the destination is outside of the selected region.
+
+* hibtypes.el (text-toc): Use string-trim to remove occasional stray newline 
at end of toc sections.
+
+* hpath.el (hpath:auto-completing-read-modes): Add to suppress automatic press 
of ? key when
+    displaying hpath:choose-from-path-variable completions when any of these 
modes are enabled.
+           (hpath:at-p, hpath:is-p): Tighten matches to reduce improper 
multi-line selections.
+
 * hpath.el (hpath:is-path-variable-p): Add to test if a string is a 
path-related variable.
            (hpath:choose-from-path-variable):
-  hibtypes.el (pathname): Use this new function.
+  hibtypes.el (pathname): Use this new function and document path variable 
handling.
 
 * hibtypes.el (require 'hversion): Add this since added calls to  hyperb:* 
into this file.
 
diff --git a/hmouse-drv.el b/hmouse-drv.el
index f56b8ee..1f93b9b 100644
--- a/hmouse-drv.el
+++ b/hmouse-drv.el
@@ -585,24 +585,30 @@ Highlight the thrown region for DISPLAY-DELAY seconds.
 
 Return t if thrown, else nil."
   (when (or (use-region-p) throw-region-flag)
-    (if (> (region-end) (region-beginning))
-       ;; Non-empty region
-       (if (eq (window-buffer depress-window) (window-buffer release-window))
-           (user-error "(hkey-insert-region): Can't throw region from and to 
the same buffer")
-         (let* ((orig-buf (current-buffer))
-                (orig-start (region-beginning))
-                (orig-end (region-end))
-                (len (- orig-end orig-start))
-                insert-start
-                insert-end)
-           (select-window release-window 'mark-for-redisplay)
-           (setq insert-start (point)
-                 insert-end (+ insert-start len))
-           (insert-buffer-substring orig-buf orig-start orig-end)
-           (hmouse-pulse-region insert-start insert-end)
-           (sit-for display-delay)
-           t))
-      (user-error "(hkey-insert-region): Can't throw an empty region"))))
+    (cond ((or (not (window-live-p depress-window))
+              (not (window-live-p release-window)))
+          (user-error "(hkey-insert-region): Invalid window: depress window: 
'%s'; release window: '%s'"
+                      depress-window release-window))
+         ((> (region-end) (region-beginning))
+          ;; Non-empty region
+          (if (and (eq (window-buffer depress-window) (window-buffer 
release-window))
+                   (<= (region-beginning) (window-point release-window))
+                   (>= (region-end) (window-point release-window)))
+              (user-error "(hkey-insert-region): Can't throw region to a point 
within the region")
+            (let* ((orig-buf (current-buffer))
+                   (orig-start (region-beginning))
+                   (orig-end (region-end))
+                   (len (- orig-end orig-start))
+                   insert-start
+                   insert-end)
+              (select-window release-window 'mark-for-redisplay)
+              (setq insert-start (point)
+                    insert-end (+ insert-start len))
+              (insert-buffer-substring orig-buf orig-start orig-end)
+              (hmouse-pulse-region insert-start insert-end)
+              (sit-for display-delay)
+              t)))
+         (t (user-error "(hkey-insert-region): Can't throw an empty 
region")))))
 
 ;;;###autoload
 (defun hkey-buffer-to (from-window to-window)
diff --git a/hpath.el b/hpath.el
index d9a11f9..8d8c07e 100644
--- a/hpath.el
+++ b/hpath.el
@@ -32,6 +32,11 @@
 ;;; Public Variables
 ;;; ************************************************************************
 
+(defcustom hpath:auto-completing-read-modes '(helm-mode ivy-mode 
selectrum-mode)
+  "*List of boolean mode variables whose modes automatically list completions 
without the need for pressing the ? key."
+  :type '(repeat variable)
+  :group 'hyperbole-commands)
+
 (defvar hpath:auto-variable-alist
   '(("\\.el[cn]?\\'" . load-path)
     ("\\.org\\'" . org-directory)
@@ -62,9 +67,9 @@ Group 1 is the line number.  Group 3 is the column number.")
 Group 1 is the variable name.")
 
 (defvar hpath:path-variable-value-regexp
- (concat 
"\\`\\.?:[^:;]+:[^:;]+:\\|:\\.?:\\|:[^:;]+:[^:;]+:\\|:[^:;]+:[^:;]+:\\.?\\'"
+ (concat 
"\\`\\.?:[^:;\t\n\r\f]+:[^:;\t\n\r\f]+:\\|:\\.?:[^:;\t\n\r\f]+:\\|:[^:;\t\n\r\f]+:[^:;\t\n\r\f]+:\\|:[^:;\t\n\r\f]+:[^:;\t\n\r\f]+:\\.?\\'"
         "\\|"
-        
"\\`\\.?;[^;]+;[^;]+;\\|;\\.?;\\|;[^;]+;[^;]+;\\|;[^;]+;[^;]+;\\|;[^;]+;[^;]+;\\.?\\'")
+        
"\\`\\.?;[^;\t\n\r\f]+;[^;\t\n\r\f]+;\\|;\\.?;\\|;[^;\t\n\r\f]+;[^;\t\n\r\f]+;\\|;[^;\t\n\r\f]+;[^;\t\n\r\f]+;\\|;[^;\t\n\r\f]+;[^;\t\n\r\f]+;\\.?\\'")
   ;; A zero-length (null) directory name in the value of PATH indicates the 
current directory.
   ;; A null directory name may appear as two adjacent colons, or as an initial 
or trailing colon.
   "Regexp that heuristically matches to colon-separated (Posix) or 
semicolon-separated (Windows) path variable values.")
@@ -793,25 +798,24 @@ Texinfo file references.  If optional TYPE is the symbol 
'file or 'directory,
 then only that path type is accepted as a match.  Only locally reachable
 paths are checked for existence.  With optional NON-EXIST, nonexistent local
 paths are allowed.  Absolute pathnames must begin with a `/' or `~'."
-  (cond
-   ;; Local file URLs
-   ;; ((hpath:is-p (hargs:delimited "file://" "[ \t\n\r\"\'\}]" nil t)))
-   ((hpath:remote-at-p))
-   ((hpath:www-at-p) nil)
-   ((let ((path (hpath:delimited-possible-path non-exist))
-         subpath)
-     (when (and path (not non-exist) (string-match hpath:prefix-regexp path))
-       (setq non-exist t))
-     (if (and path (string-match hpath:path-variable-value-regexp path))
-        ;; With point inside a path variable, return the path that point is on 
or to the right of.
-        (or (and (setq subpath (hargs:delimited "[:\"\']" "[:\"\']" t t nil 
"[\t\n\r\f]\\|[;:] \\| [;:]"))
-                 (not (string-match "[:;]" subpath))
-                 subpath)
-            (and (setq subpath (hargs:delimited "[;\"\']" "[;\"\']"  t t nil 
"[\t\n\r\f]\\|[;:] \\| [;:]"))
-                 (not (string-match ";\\|:[^:]*:" subpath))
-                 subpath)
-            ".")
-       (hpath:is-p path type non-exist))))))
+  (let ((path (hpath:delimited-possible-path non-exist))
+       subpath)
+    (when (and path (not non-exist) (string-match hpath:prefix-regexp path))
+      (setq non-exist t))
+    (cond ((and path (string-match hpath:path-variable-value-regexp path))
+          ;; With point inside a path variable, return the path that point is 
on or to the right of.
+          (or (and (setq subpath (hargs:delimited "[:\"\']" "[:\"\']" t t nil 
"[\t\n\r\f]\\|[;:] \\| [;:]"))
+                   (not (string-match "[:;\t\n\r\f]" subpath))
+                   subpath)
+              (and (setq subpath (hargs:delimited "[;\"\']" "[;\"\']"  t t nil 
"[\t\n\r\f]\\|[;:] \\| [;:]"))
+                   (not (string-match "[;\t\n\r\f]\\|:[^:]*:" subpath))
+                   subpath)
+              "."))
+         ((hpath:is-p path type non-exist))
+         ;; Local file URLs
+         ;; ((hpath:is-p (hargs:delimited "file://" "[ \t\n\r\"\'\}]" nil t)))
+         ((hpath:remote-at-p))
+         ((hpath:www-at-p) nil))))
 
 (defun hpath:call (func path)
   "Call FUNC with one argument, a PATH, stripped of any prefix operator and 
suffix location.
@@ -884,7 +888,8 @@ Make any path within a file buffer absolute before 
returning. "
                paths (and path-value
                           (split-string path-value (if (string-match ";" 
path-value) ";" ":") nil "\\s-")))
       (setq paths (sort (mapcar (lambda (path) (if (string-empty-p path) "." 
path)) paths) #'string-lessp))
-      (kbd-key:key-series-to-events "?")
+      (unless (memq t (mapcar (lambda (mode) (and (fboundp mode) (symbol-value 
mode))) hpath:auto-completing-read-modes))
+       (kbd-key:key-series-to-events "?"))
       (completing-read (format "%s path from ${%s}: "
                               (if (stringp action-str) action-str "Choose")
                               path-var)
@@ -973,10 +978,11 @@ window in which the buffer is displayed."
 
 (defun hpath:expand (path)
   "Expand relative PATH using the load variable from the first file matching 
regexp in `hpath:auto-variable-alist'."
-  (setq path (hpath:substitute-value
-             (if (string-match "\\`[\\/~.]" path)
-                 (expand-file-name path)
-               (hpath:expand-with-variable path))))
+  (unless (file-name-absolute-p path)
+    (setq path (hpath:substitute-value
+               (if (string-match "\\`[\\/~.]" path)
+                   (expand-file-name path)
+                 (hpath:expand-with-variable path)))))
   ;; For compressed Elisp libraries, add any found compressed suffix to the 
path.
   (or (locate-library path t) path))
 
@@ -1128,19 +1134,16 @@ buffer but don't display it."
                     executable)
                 (cond ((stringp display-executables)
                        (hact 'exec-window-cmd
-                             (hpath:command-string display-executables
-                                                   filename))
+                             (hpath:command-string display-executables 
filename))
                        nil)
                       ((functionp display-executables)
                        (funcall display-executables filename)
                        (current-buffer))
                       ((and (listp display-executables) display-executables)
-                       (setq executable (hpath:find-executable
-                                         display-executables))
+                       (setq executable (hpath:find-executable 
display-executables))
                        (if executable
                            (hact 'exec-window-cmd
-                                 (hpath:command-string executable
-                                                       filename))
+                                 (hpath:command-string executable filename))
                          (error "(hpath:find): No available executable from: 
%s"
                                 display-executables)))
                       (t (setq path (hpath:validate path))
@@ -1294,7 +1297,10 @@ stripped, link anchors at the end following a # or , 
character
 are temporarily stripped, and path variables are expanded with
 `hpath:substitute-value'.  This normalized path form is what is
 returned for PATH."
-  (when (and (stringp path) (not (string-match 
hpath:path-variable-value-regexp path)))
+  (when (and (stringp path) (not (string-match 
hpath:path-variable-value-regexp path))
+            ;; If a single character in length, must be a word or symbol 
character
+            (or (/= (length path) 1) (and (string-match "\\sw\\|\\s_" path)
+                                          (not (string-match "[@#&!*]" 
path)))))
     (setq path (hpath:call
                (lambda (path)
                  (let (modifier
@@ -1357,7 +1363,12 @@ returned for PATH."
                                          (concat modifier (format rtn-path 
suffix)))
                                      (concat modifier (format rtn-path 
""))))))))))
                path))
-     (unless (string-empty-p path)
+     (unless (or (string-empty-p path)
+                (string-match "#['`\"]" path)
+                ;; If a single character in length, must be a word or symbol 
character
+                (and (= (length path) 1) (or (not (string-match "\\sw\\|\\s_" 
path))
+                                             (string-match "[@#&!*]" path))))
+
        path)))
 
 (defun hpath:push-tag-mark ()
@@ -1470,14 +1481,16 @@ in-buffer path will not match."
            (setq rest-of-path (substring rest-of-path 1)))
          (if (or (and sym (boundp sym)) (getenv var-name))
              (funcall (if trailing-dir-sep-flag #'directory-file-name 
#'identity)
-                      ;; hpath:substitute-dir triggers an error when given an
-                      ;; invalid local path but this may be called when
-                      ;; testing for implicit button matches where no error
-                      ;; should occur, so catch the error and ignore variable
-                      ;; expansion in such a case.  -- RSW, 08-26-2019
+                      ;; hpath:substitute-dir may trigger an error but this may
+                      ;; be called when testing for implicit button matches
+                      ;; where no error should occur, so catch the error
+                      ;; and ignore variable expansion in such a case.
+                      ;; -- RSW, 08-26-2019
+                      ;; Removed errors on non-existent paths.
+                      ;; -- RSW, 04-19-2021
                       (condition-case nil
                           (hpath:substitute-dir var-name rest-of-path)
-                        (error rest-of-path)))
+                        (error var-name)))
            var-group)))
       t t)))
 
@@ -1918,13 +1931,13 @@ local pathname."
                                      ((string-match "path" var-name)
                                       (split-string (getenv var-name) ":"))
                                      (t (getenv var-name))))))
-          (when (hpath:validate (expand-file-name rest-of-path val))
+          (when (expand-file-name rest-of-path val)
             val))
          ((listp val)
           (let* ((path (locate-file rest-of-path val (cons "" hpath:suffixes)))
                  (dir (if path (file-name-directory path))))
             (if dir
-                (hpath:validate (directory-file-name dir))
+                (directory-file-name dir)
               (error "(hpath:substitute-dir): Can't find match for \"%s\""
                      (concat "$\{" var-name "\}/" rest-of-path)))))
          (t (error "(hpath:substitute-dir): Value of VAR-NAME, \"%s\", must be 
a string or list" var-name)))))
diff --git a/hui-mouse.el b/hui-mouse.el
index 94119ce..b476e73 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -99,6 +99,9 @@ Its default value is #'smart-scroll-down."
     ((and (boundp 'company-active-map)
          (memq company-active-map (current-minor-mode-maps))) .
          ((smart-company-to-definition) . (smart-company-help)))
+    ;; Ivy minibuffer completion mode
+    ((and (boundp 'ivy-mode) ivy-mode (minibuffer-window-active-p 
(selected-window))) .
+     ((ivy-done) . (ivy-dispatching-done)))
     ;;
     ;; Treemacs hierarchical file manager
     ((eq major-mode 'treemacs-mode) .
@@ -156,7 +159,8 @@ Its default value is #'smart-scroll-down."
     ;; The Smart Menu system is an attractive in-buffer menu system
     ;; that works on any display system that supports Emacs.  It
     ;; predates Emacs' menu systems; it is a part of InfoDock.
-    ;; It is not included with Hyperbole.
+    ;; It is not included with Hyperbole but is compatible with the
+    ;; Smart Keys.
     ;;
     ;; This selects or gives help for a menu item.
     ((eq major-mode 'smart-menu-mode) .
@@ -249,6 +253,10 @@ Its default value is #'smart-scroll-down."
         (string-match "^\\*Help\\|Help\\*$" (buffer-name))) .
         ((hkey-help-hide) . (hkey-help-hide)))
     ;;
+    ;; Handle widgets in Custom-mode
+    ((eq major-mode 'Custom-mode) .
+     ((smart-custom) . (smart-custom-assist)))
+    ;;
     ;; Emacs bookmarks menu (bookmark.el)
     ((eq major-mode 'bookmark-bmenu-mode) .
      ((bookmark-jump (bookmark-bmenu-bookmark) 
(hpath:display-buffer-function)) .
@@ -598,6 +606,55 @@ If assist-key is pressed:
        (t (ibuffer-mark-for-delete nil nil 1))))
 
 ;;; ************************************************************************
+;;; smart-custom and widget functions
+;;; ************************************************************************
+
+(defun smart-custom ()
+  "Use a single key or mouse key to manipulate customizable settings.
+
+Invoked via a key press when in Custom-mode.  It assumes that
+its caller has already checked that the key was pressed in an
+appropriate buffer and has moved the cursor there.
+
+If key is pressed:
+ (1) on the last line of the buffer, exit Custom mode, potentially
+     prompting to save any changes;
+ (2) at the end of any other line, scroll the window down down a windowful;
+ (3) if a mouse event on a widget, activate the widget or display a menu;
+ (4) anywhere else, execute the command bound to {RETURN}."
+  (interactive)
+  (cond ((last-line-p) (Custom-buffer-done)
+       ((eolp) (smart-scroll-up)))
+       ((mouse-event-p last-command-event)
+        (widget-button-click action-key-release-args))
+        ;; Handle widgets in Custom-mode
+       (t (Custom-newline (point)))))
+
+(defun smart-custom-assist ()
+  "Use an assist-key or mouse assist-kkey to manipulate customizable settings.
+
+Invoked via a key press when in Custom-mode.  It assumes that
+its caller has already checked that the key was pressed in an
+appropriate buffer and has moved the cursor there.
+
+If key is pressed:
+ (1) on the last line of the buffer, exit Custom mode, potentially
+     prompting to save any changes;
+ (2) at the end of any other line, scroll the window down down a windowful;
+ (3) if a mouse event on a widget, activate the widget or display a menu;
+ (4) anywhere else, execute the command bound to {RETURN}."
+  (interactive)
+  (cond ((last-line-p) (Custom-buffer-done)
+       ((eolp) (smart-scroll-down)))
+       ((mouse-event-p last-command-event)
+        (widget-button-click action-key-release-args))
+        ;; Handle widgets in Custom-mode
+       (t (Custom-newline (point)))))
+
+
+
+
+;;; ************************************************************************
 ;;; smart-calendar functions
 ;;; ************************************************************************
 
diff --git a/hui-window.el b/hui-window.el
index feef69a..654c035 100644
--- a/hui-window.el
+++ b/hui-window.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    21-Sep-92
 ;;
-;; Copyright (C) 1992-2019  Free Software Foundation, Inc.
+;; Copyright (C) 1992-2021  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -182,21 +182,16 @@ drag release window.")
     (setq hmouse-alist
          (append
           '(
-            ;; If click in the minibuffer when it is not active (blank),
-            ;; display the Hyperbole minibuffer menu or popup the jump menu.
-            ((hmouse-inactive-minibuffer-p) .
-             ((funcall action-key-minibuffer-function) .
-              (funcall assist-key-minibuffer-function)))
             ((hmouse-drag-thing) .
              ((hmouse-yank-region) . (hmouse-kill-and-yank-region)))
             ((hmouse-drag-window-side) .
              ((hmouse-resize-window-side) . (hmouse-resize-window-side)))
             ;;
-            ;; Although Hyperbole can distinguish whether
-            ;; inter-window drags are between frames or not,
-            ;; having different behavior for those 2 cases could
-            ;; be confusing, so treat all modeline drags between
-            ;; windows the same and comment out this next clause.
+            ;; Although Hyperbole can distinguish whether inter-window
+            ;; drags are between frames or not, having different behavior
+            ;; for those 2 cases could be confusing, so treat all
+            ;; modeline drags between windows the same and comment out
+            ;; this next clause.
             ;;   Modeline drag between frames
             ;;   ((and (hmouse-modeline-depress) (hmouse-drag-between-frames)) 
.
             ;;    ((hmouse-clone-window-to-frame) . 
(hmouse-move-window-to-frame)))
@@ -234,6 +229,16 @@ drag release window.")
              ((or (hmouse-drag-item-to-display)
                   (hycontrol-clone-window-to-new-frame)) .
                   (hycontrol-window-to-new-frame)))
+            ;; If click in the minibuffer when it is not active (blank),
+            ;; display the Hyperbole minibuffer menu or popup the jump menu.
+            ((hmouse-inactive-minibuffer-p) .
+             ((funcall action-key-minibuffer-function) .
+              (funcall assist-key-minibuffer-function)))
+            ((and (boundp 'ivy-mode) ivy-mode (minibuffer-window-active-p 
(selected-window))) .
+             ((ivy-mouse-done action-key-release-args) . 
(ivy-mouse-dispatching-done assist-key-release-args)))
+            ;; Handle widgets in Custom-mode
+            ((eq major-mode 'Custom-mode) .
+             ((smart-custom) . (smart-custom-assist)))
             ;;
             ;; Now since this is not a drag and if there was an active
             ;; region prior to when the Action or Assist Key was
@@ -329,9 +334,7 @@ displayed in all windows on screen, including the dired 
window.
 
 If the directory is re-read into the dired buffer with {g}, then Action
 Key behavior reverts to as though no items have been dragged."
-  nil
-  " DisplayHere"
-  nil
+  :lighter " DisplayHere"
   (if hmouse-dired-display-here-mode
       (progn (set (make-local-variable 'hpath:display-where) 'this-window)
             (add-hook 'dired-after-readin-hook 'hmouse-dired-readin-hook nil 
t))
@@ -460,7 +463,7 @@ Signals an error if the buffer is read-only."
        ;; In this case, we want an error that will terminate execution so that
        ;; hkey-region is not reset to nil.  This allows the user to fix the
        ;; problem and then to try yanking again.
-       (error "(hmouse-yank-region): Use {%s} to enable yanking into this 
buffer"
+       (error "(hmouse-yank-region): Buffer is read-only; use {%s} to enable 
yanking"
               (hmouse-read-only-toggle-key))
       ;; Permanently return to release point
       (let ((release-window (if assist-flag assist-key-release-window 
action-key-release-window)))
diff --git a/hui.el b/hui.el
index 608f2ff..f2c6a3e 100644
--- a/hui.el
+++ b/hui.el
@@ -169,6 +169,8 @@ Signal an error when no such button is found in the current 
buffer."
   (let ((lbl (ebut:key-to-label lbl-key))
        (but-buf (current-buffer))
        actype but new-lbl)
+    (hattr:set 'hbut:current 'loc (hui:key-src but-buf))
+    (hattr:set 'hbut:current 'dir (hui:key-dir but-buf))
     (save-excursion
       (unless (called-interactively-p 'interactive)
        (hui:buf-writable-err but-buf "ebut-modify"))
@@ -187,8 +189,6 @@ Signal an error when no such button is found in the current 
buffer."
                     (hbut:max-len))
             'string))
 
-      (hattr:set 'hbut:current 'loc (hui:key-src but-buf))
-      (hattr:set 'hbut:current 'dir (hui:key-dir but-buf))
       (setq actype (hui:actype (hattr:get but 'actype)))
       (hattr:set 'hbut:current 'actype actype)
       (hattr:set 'hbut:current 'args (hargs:actype-get actype 'modifying))



reply via email to

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