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

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

[elpa] externals/hyperbole 73fed44 28/51: Fix in-buffer text as ebut lab


From: Stefan Monnier
Subject: [elpa] externals/hyperbole 73fed44 28/51: Fix in-buffer text as ebut label; allow line/col in link-to-file
Date: Sun, 12 Jul 2020 18:10:14 -0400 (EDT)

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

    Fix in-buffer text as ebut label; allow line/col in link-to-file
---
 .hypb              | Bin 2527 -> 3430 bytes
 Changes            |  27 ++++++++++++++++++++
 DEMO               |  59 +++++++++++++++++++++++++-------------------
 HY-ABOUT           |   8 +++---
 HY-NEWS            |  21 ++++++++++++++++
 hactypes.el        |  44 ++++++++++++++++++++++++---------
 hbut.el            |  71 ++++++++++++++++++++++++++++++++++-------------------
 hib-kbd.el         |   7 +++++-
 hpath.el           |  19 +++++++++++++-
 hui-mouse.el       |   3 ++-
 hui.el             |  19 ++++++--------
 hyperbole.el       |   2 +-
 man/hyperbole.texi |  36 +++++++++++++++++++++------
 13 files changed, 227 insertions(+), 89 deletions(-)

diff --git a/.hypb b/.hypb
index efa003a..a10260c 100644
Binary files a/.hypb and b/.hypb differ
diff --git a/Changes b/Changes
index 75c7f33..985ebd8 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,30 @@
+2020-02-22  Bob Weiner  <rsw@gnu.org>
+
+* man/hyperbole.texi (Smart Key - Bookmark Mode): Added.
+
+* hpath.el (hpath:file-line-and-column): Added.
+  hactypes.el (link-to-file): Rewrote to use above function, allow for 
:line:column suffixes and
+    trigger error if path argument is invalid.
+
+* hui-mouse.el (hkey-alist): Fixed bookmark-bmenu-mode so Assist Key shows 
what Action Key does
+    rather than generic help.
+
+* hbut.el (ebut:operate): Appended any instance-flag string to the button 
label; this fixed
+    error where point moved to the wrong location when creating a new numbered 
instance of
+    a particular button label.  Also, fixed so any existing text following 
point or
+    highlighted as region is used in button labels, rather than new text being 
inserted.
+          (ebut:delimit): Changed instance-str to instance-flag since not 
always a string.
+
+2020-02-17  Bob Weiner  <rsw@gnu.org>
+
+* hpath.el (hpath:mswindows-to-posix): Made '\\' by itself in Windows an 
invalid path.
+
+* hib-kbd.el (kbd-key:key-series-to-events): Added for use in testing and 
called from kbd-key:act.
+
+==============================================================================
+V7.1.0 test release changes ^^^^:
+==============================================================================
+
 2020-02-17  Bob Weiner  <rsw@gnu.org>
 
 * Published 7.0.9 test release.
diff --git a/DEMO b/DEMO
index ba4d662..9527b61 100644
--- a/DEMO
+++ b/DEMO
@@ -110,7 +110,7 @@ after the point at which you load Hyperbole or else set it 
as part of
 hyperbole-init-hook, which executes whenever Hyperbole is loaded, e.g.:
 
    (add-to-list 'hyperbole-init-hook
-               (lambda () (setq smart-scroll-proportional nil)))
+                (lambda () (setq smart-scroll-proportional nil)))
 
 ** Hyperbole Menus
 
@@ -221,7 +221,7 @@ There are two submodes of HyControl: one for controlling 
windows and one for
 controlling frames, although a number of commands are available in both modes
 where they are useful.
 
-Hyperbole binds {C-c \} to invoke HyControl windows control; otherwise, the
+Hyperbole binds {C-c \\} to invoke HyControl windows control; otherwise, the
 Hyperbole minibuffer menu item, Screen/WindowsControl {C-h h s w}, will do
 the same thing.
 
@@ -258,7 +258,7 @@ the argument is used to adjust one dimension of the frame.
 
    { f }        - clone the selected window to a new frame
    { F }        - tear off the selected window (if more than one window)
-                 into a new frame
+          into a new frame
 
 ** Windows Grid
 
@@ -335,22 +335,22 @@ this DEMO.  The date at the end of each record is 
automatically added by
 HyRolo whenever a new record is added.
 
    ==================================================================
-                         DEMO ROLO
+              DEMO ROLO
    ==================================================================
    *    HiHo Industries
    **     Strong, Hugo            <hs@hiho.com>  W708-555-9821
-               Manager
-               04/12/2017
+        Manager
+        04/12/2017
    ***      Smith, John           <js@hiho.com>  W708-555-2001
-               Chief Ether Maintainer
-               05/24/2017
+        Chief Ether Maintainer
+        05/24/2017
    *    Work Industries
    **     Hansen, Dan             <dh@work.com>  W218-555-2311
-               Manager
-               02/18/2017
+        Manager
+        02/18/2017
    ***      Dunn, John            <md@work.com>  W218-555-3233
-               Media Maker
-               11/2/2017
+        Media Maker
+        11/2/2017
 
 ** String Searches
 
@@ -672,7 +672,7 @@ way to link to and jump to any named item within a manual.
 If you use the standard Emacs library "tramp.el" for working with remote
 files and directories, then remote pathnames of the form:
 
-       /protocol:user@host.domain:/path
+    /protocol:user@host.domain:/path
 
 will be recognized by Hyperbole.
 
@@ -689,7 +689,7 @@ If you enable the Hyperbole option to use URLs when finding 
files with
 the {C-x C-f} (find-file) command via the {C-h h c f} key sequence, then
 you can also use paths of the form:
 
-       ftp://ftp.gnu.org/pub/
+    ftp://ftp.gnu.org/pub/
 
 *** POSIX and MSWindows Paths
 
@@ -1180,13 +1180,14 @@ names that you can remember.  Then they can be 
activated quickly.
 
 Let's create a global button that counts the lines in the current
 buffer and displays the count in the minibuffer.  Press the Action Key
-on the first line of this key series to create the global button:
+on the first line of this key series to create the global button named
+"line-count":
 
      {C-h h g c line-count RET eval-elisp RET
       (message "Lines in %s = %s"
                (buffer-name) (count-lines (point-min) (point-max))) RET}
 
-Then activate it with {C-h h g a}, type its name and try it out in
+Then activate it with {C-h h g a line-count RET}. Try it out in
 different buffers.
 
 To avoid embedding such code in the button itself, just define a
@@ -1201,11 +1202,18 @@ Then button creation would be:
 
      {C-h h g c line-count RET eval-elisp RET (line-count) RET}
 
+and activation would be the same as above.
+
 Defining a link to a file section is even easier, say to the section
 below here:
 
      {C-h h g c smk RET link-to-file RET "DEMO#Smart Mouse Keys" RET}
 
+Then
+
+     {C-h h g a smk RET}
+
+to activate it.
 
 * Smart Mouse Keys
 
@@ -1294,15 +1302,16 @@ which you want help, performing any action necessary to 
register a context,
 such as a drag motion, and then pressing the other Smart Key and releasing
 both.
 
-Here is an example.  Depress the Action Key somewhere within this paragraph
-and while holding it down, depress the Assist Key.  Then release the keys in
-any order and the help display will pop up.  It explains the context in
-which the Action Key was pressed and what it does in that context.  Try it.
-Basically, you just depress the Smart Mouse Key you want help for and while
-holding it down, depress the other Smart Mouse Key to get help.  If you use
-the mouse a lot, this is a great key combination to master as it will let
-you explore the many different contextual actions that Hyperbole offers
-without having to trigger any of them.
+Here is an example.  Depress the Action Mouse Key somewhere within this
+paragraph and while holding it down, depress the Assist Mouse Key.  Then
+release the keys in any order and the help display will pop up.  It
+explains the context in which the Action Mouse Key was pressed and what it
+does in that context.  Try it.  Basically, you just depress the Smart
+Mouse Key you want help for and while holding it down, depress the other
+Smart Mouse Key to get help.  If you use the mouse a lot, this is a great
+key combination to master as it will let you explore the many different
+contextual actions that Hyperbole offers without having to trigger any of
+them.
 
 ** Creating and Deleting Windows
 
diff --git a/HY-ABOUT b/HY-ABOUT
index a2d3855..26935bb 100644
--- a/HY-ABOUT
+++ b/HY-ABOUT
@@ -1,8 +1,8 @@
-                         ABOUT GNU HYPERBOLE
+                          ABOUT GNU HYPERBOLE
 
-                  Designed and Written by Bob Weiner
-               Maintained by Mats Lidell and Bob Weiner
-                https://www.gnu.org/software/hyperbole/
+                   Designed and Written by Bob Weiner
+                Maintained by Mats Lidell and Bob Weiner
+                 https://www.gnu.org/software/hyperbole/
                             Version 7.0.9
 
          Say thanks or send a testimonial if you like Hyperbole:
diff --git a/HY-NEWS b/HY-NEWS
index 45eb165..347d8ec 100644
--- a/HY-NEWS
+++ b/HY-NEWS
@@ -2,6 +2,27 @@
                                 by Bob Weiner
 
 ===========================================================================
+*                                   V7.1.0
+===========================================================================
+
+  BUTTON TYPES
+
+    - In-buffer Labels: Fixed a number of in-buffer text handling issues
+      with the creation of explicit buttons, maximizing reuse of existing
+      text in labels.
+
+    - link-to-file Action Type: Extended to allow file path to include 
+      either :line-num:column-num or just :line-num at the end (translated
+      to character location within the button).
+
+  DOCUMENTATION
+
+    - Bookmark Mode: Added Hyperbole Manual section, "Smart Key - Bookmark 
Mode"
+      that allows linking to Emacs Bookmarks.  See "(hyperbole)Smart Key -
+      Bookmark Mode".
+
+
+===========================================================================
 *                                   V7.0.9
 ===========================================================================
 
diff --git a/hactypes.el b/hactypes.el
index 6d18ef5..23bb070 100644
--- a/hactypes.el
+++ b/hactypes.el
@@ -352,9 +352,20 @@ the window."
                ;; have introduced.
                (path (hpath:trim (read-file-name "Path to link to: "
                                                  file-path file-path)))
-               ;; Ensure any variables and heading suffixes following
-               ;; [#,] are removed before doing path matching.
-               (normalized-path (hpath:is-p path)))
+               (orig-path path)
+               path-line-and-col
+               line-num
+               column-num
+               normalized-path)
+          ;; Handle if :line:column are included in path.
+          (setq path-line-and-col (hpath:file-line-and-column path))
+          (when path-line-and-col
+            (setq path (nth 0 path-line-and-col)
+                  line-num (nth 1 path-line-and-col)
+                  column-num (nth 2 path-line-and-col)))
+          ;; Ensure any variables and heading suffixes following
+          ;; [#,] are removed before doing path matching.
+          (setq normalized-path (hpath:is-p path))
           (when (not (or (file-name-absolute-p path)
                          (string-match "\\`\\$\{" path)))
             (setq path (concat default-directory path)))
@@ -364,7 +375,7 @@ the window."
                                   (prog1 (set-buffer (find-file-noselect 
normalized-path t))
                                     (when (integerp file-point)
                                       (goto-char (min (point-max) 
file-point)))))))
-          (if path-buf
+          (if (and path-buf (not line-num))
               (with-current-buffer path-buf
                 (setq hargs:reading-p 'character)
                 (if (y-or-n-p
@@ -372,17 +383,26 @@ the window."
                              (count-lines 1 (point))))
                     (list path (point))
                   (list path)))
-            (list path)))
+            (if path-buf
+                (delq nil (list path (save-excursion
+                                       (goto-char (point-min))
+                                       (forward-line (1- line-num))
+                                       (when column-num (move-to-column 
column-num))
+                                       (point))))
+              (list (or path orig-path)))))
        (setq hargs:reading-p prev-reading-p)
        (when (and path-buf (not existing-buf))
         (kill-buffer path-buf)))))
-  ;; Remove any double quotes and whitespace at the start and end of
-  ;; the path that use within a key series may have introduced.
-  (setq path (hpath:trim path))
-  (and (hpath:find path)
-       (integerp point)
-       (progn (goto-char (min (point-max) point))
-             (recenter 0))))
+  (if path
+      (progn
+       ;; Remove any double quotes and whitespace at the start and end of
+       ;; the path that use within a key series may have introduced.
+       (setq path (hpath:trim path))
+       (and (hpath:find path)
+            (integerp point)
+            (progn (goto-char (min (point-max) point))
+                   (recenter 0))))
+    (hypb:error "(link-to-file): Invalid file name: \"%s\"" path)))
 
 (defact link-to-file-line (path line-num)
   "Display a file given by PATH scrolled to LINE-NUM."
diff --git a/hbut.el b/hbut.el
index 095fc6c..6630ebb 100644
--- a/hbut.el
+++ b/hbut.el
@@ -311,13 +311,14 @@ button is found in the current buffer."
     (or new-label (setq new-label curr-label))
     (hattr:set 'hbut:current 'lbl-key (ebut:label-to-key new-label))
     (save-excursion
-      (if (setq instance-flag
-               (if modify (ebut:modify lbl-key) (ebut:create)))
-         (if (hmail:editor-p) (hmail:msg-narrow))))
+      (when (setq instance-flag
+                 (if modify (ebut:modify lbl-key) (ebut:create)))
+       (when (hmail:editor-p)
+         (hmail:msg-narrow))))
     (if instance-flag
        (progn
-         ;; Rename all occurrences of button - those with same label
          (if modify
+             ;; Rename all occurrences of button - those with same label
              (let* ((but-key-and-pos (ebut:label-p nil nil nil 'pos))
                     (at-but (equal (car but-key-and-pos)
                                    (ebut:label-to-key new-label))))
@@ -335,13 +336,23 @@ button is found in the current buffer."
                        lbl-regexp 'include-delims))
                      (at-but)
                      ((hypb:error "(ebut:operate): No button matching: %s" 
curr-label))))
+
            ;; Add a new button recording its start and end positions
-           (let (start end buf-lbl)
-             (cond ((and (not curr-label)
-                         (hmouse-use-region-p)
-                         (marker-position (hypb:mark-marker t))
-                         (setq start (region-beginning)
-                               end (region-end)
+           (let (start end mark prev-point buf-lbl)
+             (cond ((not curr-label)
+                    (setq start (point))
+                    (insert new-label)
+                    (setq end (point)))
+                   ((and (hmouse-use-region-p)
+                         (setq mark (marker-position (hypb:mark-marker t)))
+                         (setq prev-point (and action-key-depress-prev-point
+                                               (marker-position 
action-key-depress-prev-point)))
+                         (setq start (if (and prev-point mark (<= prev-point 
mark))
+                                         prev-point
+                                       (region-beginning))
+                               end (if (and prev-point mark (> prev-point 
mark))
+                                       prev-point
+                                     (region-end))
                                buf-lbl (buffer-substring start end))
                          (equal buf-lbl curr-label))
                     nil)
@@ -352,7 +363,14 @@ button is found in the current buffer."
                    (t (setq start (point))
                       (insert curr-label)
                       (setq end (point))))
-             (ebut:delimit start end instance-flag)))
+             (ebut:delimit start end instance-flag)
+             (goto-char start)))
+
+         ;; Append any instance-flag string to the button label
+         (when (stringp instance-flag)
+           (setq new-label (concat new-label instance-flag))
+           (hattr:set 'hbut:current 'lbl-key (ebut:label-to-key new-label)))
+
          ;; Position point
          (let ((new-key (ebut:label-to-key new-label)))
            (cond ((equal (ebut:label-p) new-key)
@@ -364,15 +382,17 @@ button is found in the current buffer."
                     (or (re-search-forward  regexp nil t)
                         (re-search-backward regexp nil t)))
                   (goto-char (+ (match-beginning 0) (length ebut:start))))))
+
          ;; instance-flag might be 't which we don't want to return.
          (when (stringp instance-flag) instance-flag))
+
       (hypb:error
        "(ebut:operate): Operation failed.  Check button attribute permissions: 
%s"
        hattr:filename))))
 
 (defun    ebut:search (string out-buf &optional match-part)
-  "Writes explicit button lines matching STRING to OUT-BUF.
-Searches across all files into which the user has previously saved explicit 
buttons.
+  "Write explicit button lines matching STRING to OUT-BUF.
+Searche across all files into which the user has previously saved explicit 
buttons.
 By default, only matches for whole button labels are found; optional MATCH-PART
 enables partial matches."
   (let*  ((buffers (mapcar (lambda (dir)
@@ -476,26 +496,28 @@ Leave point inside the button label.  Return the symbol 
for the button, else nil
       (ebut:at-p))))
 
 ;;; ------------------------------------------------------------------------
-(defun    ebut:delimit (start end instance-str)
-  "Delimits button label spanning region START to END in current buffer.
-If button is already delimited or delimit fails, returns nil, else t.
-Inserts INSTANCE-STR after END, before ending delimiter."
+(defun    ebut:delimit (start end instance-flag)
+  "Delimit button label spanning region START to END in current buffer.
+If button is already delimited or delimit fails, return nil, else t.
+Insert INSTANCE-FLAG after END, before ending delimiter."
   (goto-char start)
-  (if (looking-at (regexp-quote ebut:start))
-      (forward-char (length ebut:start)))
+  (when (looking-at (regexp-quote ebut:start))
+    (forward-char (length ebut:start)))
   (unless (ebut:label-p)
     (setq start (move-marker (make-marker) start)
          end (move-marker (make-marker) end))
     (set-marker-insertion-type end t)
-    (if (not (stringp instance-str)) (setq instance-str ""))
+    ;; instance-flag may be 't to indicate don't add an instance number
+    (unless (stringp instance-flag)
+      (setq instance-flag ""))
     (insert ebut:start)
     (goto-char end)
-    (insert instance-str ebut:end)
+    (insert instance-flag ebut:end)
     ;; Insert any comment delimiter before the start marker.
     (set-marker-insertion-type start t)
     (hbut:comment start end)
-    (if (fboundp 'hproperty:but-add)
-       (hproperty:but-add start end hproperty:but))
+    (when (fboundp 'hproperty:but-add)
+      (hproperty:but-add start end hproperty:but))
     (goto-char end)
     (move-marker start nil)
     (move-marker end nil)
@@ -635,8 +657,7 @@ Return the symbol for the button, else nil."
        (progn
          (setcdr (cdr sublist) nil)
          (setplist hbut sublist))
-      (setplist hbut nil)
-      )))
+      (setplist hbut nil))))
 
 (defun    hattr:copy (from-hbut to-hbut)
   "Copy attributes FROM-HBUT TO-HBUT, overwriting TO-HBUT attribute values.
diff --git a/hib-kbd.el b/hib-kbd.el
index b542fb1..e5052e1 100644
--- a/hib-kbd.el
+++ b/hib-kbd.el
@@ -100,7 +100,7 @@ Returns t if KEY-SERIES has a binding, else nil."
           ;; If this is a special key seqence, execute it by adding
           ;; its keys to the stream of unread command events.
           (when (kbd-key:special-sequence-p key-series)
-            (setq unread-command-events (nconc unread-command-events (mapcar 
'identity key-series)))
+             (kbd-key:key-series-to-events key-series)
             t))
          ((memq binding '(action-key action-mouse-key hkey-either))
           (beep)
@@ -108,6 +108,11 @@ Returns t if KEY-SERIES has a binding, else nil."
           t)
          (t (call-interactively binding) t))))
 
+(defun kbd-key:key-series-to-events (key-series)
+  "Insert the key-series as a series of keyboard events into Emacs' unread 
input stream."
+  ;; Could use listify-key-sequence in next line but seems slower.
+  (setq unread-command-events (nconc unread-command-events (mapcar 'identity 
key-series))))
+
 (defun kbd-key:doc (key-series &optional full)
   "Show first line of doc for binding of keyboard KEY-SERIES in minibuffer.
 With optional prefix arg FULL, display full documentation for command."
diff --git a/hpath.el b/hpath.el
index 2fcf42d..4d62e6d 100644
--- a/hpath.el
+++ b/hpath.el
@@ -90,7 +90,7 @@ Used to expand posix mount points to Windows UNC paths during 
posix-to-mswindows
   "Convert a recognizable MSWindows PATH to a Posix-style path or return the 
path unchanged.
 If path begins with an MSWindows drive letter, prefix the converted path with 
the value of 'hpath:mswindows-mount-prefix'."
   (interactive "sMSWindows path to convert to POSIX: ")
-  (when (stringp path)
+  (when (and (stringp path) (not (equal path "\\\\")))
     (setq path (hpath:mswindows-to-posix-separators path))
     (when (string-match hpath:mswindows-drive-regexp path)
       (when (string-match hpath:mswindows-drive-regexp path)
@@ -826,6 +826,23 @@ window in which the buffer is displayed."
   "Return the function to display a Hyperbole path using optional symbol 
DISPLAY-WHERE or `hpath:display-where'."
   (hpath:display-where-function display-where hpath:display-where-alist))
 
+(defun hpath:file-line-and-column (path-line-and-col)
+  "Given a `path-line-and-col' string of format: path:line:col, return a list 
with the parts parsed out, else nil."
+  (when (and (stringp path-line-and-col)
+            (string-match hibtypes-path-line-and-col-regexp path-line-and-col))
+    ;; Ensure any variables and heading suffixes following [#,] are removed 
before returning file.
+    (let ((file (save-match-data (expand-file-name (hpath:substitute-value 
(match-string-no-properties 1 path-line-and-col)))))
+         (line-num (string-to-number (match-string-no-properties 3 
path-line-and-col)))
+         (col-num (when (match-end 4)
+                    (string-to-number (match-string-no-properties 5 
path-line-and-col)))))
+      (when (and (save-match-data (setq file (hpath:is-p file)))
+                file)
+       (if line-num
+           (if col-num
+               (list file line-num col-num)
+             (list file line-num))
+         (list file))))))
+
 (defun hpath:find-noselect (filename)
   "Find but don't display FILENAME using user customizable settings of display 
program and location.
 Return the current buffer iff FILENAME is displayed within a buffer (not with 
an external
diff --git a/hui-mouse.el b/hui-mouse.el
index 294a1e1..38df759 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -240,7 +240,8 @@ Its default value is #'smart-scroll-down."
     ;; Emacs bookmarks menu (bookmark.el)
     ((eq major-mode 'bookmark-bmenu-mode) .
      ((bookmark-jump (bookmark-bmenu-bookmark) 
(hpath:display-buffer-function)) .
-      (hkey-help t)))
+      ;; Below we want the Assist Key to show what the Action Key does.
+      (hkey-help)))
     ;;
     ;; Pages directory listing mode (page-ext.el)
     ((eq major-mode 'pages-directory-mode) .
diff --git a/hui.el b/hui.el
index 4465cff..c466602 100644
--- a/hui.el
+++ b/hui.el
@@ -96,8 +96,7 @@ label."
                          (region-end))))
   (let ((default-lbl) lbl but-buf actype)
     (save-excursion
-      (setq default-lbl
-           (hui:hbut-label-default start end (not (called-interactively-p 
'interactive)))
+      (setq default-lbl (hui:hbut-label-default start end (not 
(called-interactively-p 'interactive)))
            lbl (hui:hbut-label default-lbl "ebut-create"))
       (if (not (equal lbl default-lbl)) (setq default-lbl nil))
 
@@ -325,10 +324,8 @@ invoke: {C-h h i l}, to label/name it."
        (setq lbl (concat lbl (ebut:operate lbl nil)))
        (goto-char (point-max))
        (insert "\n")
-       (save-buffer)
-       )
-      (message "%s created." lbl)
-      )))
+       (save-buffer))
+      (message "%s created." lbl))))
 
 (defun hui:gbut-modify (lbl-key)
   "Modifies a global Hyperbole button given by LBL-KEY.
@@ -467,14 +464,14 @@ Optional SKIP-LEN-TEST means don't limit label to 
`ebut:max-len' length.
 Returns nil if START or END are invalid or if region fails length test.
 
 Also has side effect of moving point to start of default label, if any."
-  (if (markerp start) (setq start (marker-position start)))
-  (if (markerp end) (setq end (marker-position end)))
+  (when (markerp start) (setq start (marker-position start)))
+  (when (markerp end) (setq end (marker-position end)))
   ;; Test whether to use region as default button label.
-  (if (and (integerp start) (integerp end)
+  (when (and (integerp start) (integerp end)
           (or skip-len-test
               (<= (max (- end start) (- start end)) ebut:max-len)))
-      (progn (goto-char start)
-            (buffer-substring start end))))
+    (goto-char start)
+    (buffer-substring-no-properties start end)))
 
 (defun hui:hbut-operate (operation operation-str &optional but)
   "Execute OPERATION (a function) described by OPERATION-STR action on a 
Hyperbole button.
diff --git a/hyperbole.el b/hyperbole.el
index d6fd808..167f480 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -250,7 +250,7 @@ Entry format is: (key-description key-sequence 
key-binding)."
          (hkey-global-set-key "\M-o" 'hkey-operate)
        (hkey-maybe-global-set-key "\M-o" 'hkey-operate)))
     ;;
-    ;; Binds {C-c @} to created a user-specified sized grid of windows
+    ;; Binds {C-c @} to create a user-specified sized grid of windows
     ;; displaying different buffers.
     ;;
     ;; Don't override prior global bindings of this key.
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index a591676..efae1a5 100644
--- a/man/hyperbole.texi
+++ b/man/hyperbole.texi
@@ -440,6 +440,7 @@ Smart Keyboard Keys
 * Smart Key - The Koutliner::
 * Smart Key - RDB Mode::
 * Smart Key - Help Buffers::
+* Smart Key - Bookmark Mode::
 * Smart Key - Pages Directory Mode::
 * Smart Key - Python Source Code::
 * Smart Key - Identifier Menu Mode ::
@@ -1362,7 +1363,7 @@ modeline show visible feedback as the window is resized.
 @subsection Moving Frames
 
 @cindex dragging frames
-cindex moving frames
+@cindex moving frames
 @cindex drag, move frame
 Drags of either Smart Key from a bottommost modeline can be configured to
 drag Emacs frames to new locations on screen.  To configure all existing
@@ -1783,10 +1784,12 @@ personal button file, @pxref{Button Files}.  You can 
always go into that
 file and activate, edit or annotate these buttons with comments.
 
 @cindex bookmarks
-Emacs has a built-in feature similar to Global Buttons called Bookmarks.
-Bookmarks store places in files or link to URLs, so they are more limited
-than Hyperbole's global buttons and cannot utilize all of Hyperbole's
-capabilities for performing actions.  @xref{Bookmarks,,,emacs, the Emacs
+Emacs has a built-in feature similar to Global Buttons called
+Bookmarks.  Bookmarks store places in files or link to URLs, so they
+are more limited than Hyperbole's global buttons and cannot utilize
+all of Hyperbole's capabilities for performing actions.  Hyperbole has
+an action type, @code{link-to-bookmark}, for using an Emacs bookmark
+as a Hyperbole button referent.  @xref{Bookmarks,,,emacs, the Emacs
 Manual}, for details on bookmarks.
 
 @node Implicit Buttons, Button Files, Global Buttons, Buttons
@@ -8233,6 +8236,7 @@ If dragged from an Emacs window to outside of Emacs:
 * Smart Key - The Koutliner::
 * Smart Key - RDB Mode::
 * Smart Key - Help Buffers::
+* Smart Key - Bookmark Mode::
 * Smart Key - Pages Directory Mode::
 * Smart Key - Python Source Code::
 * Smart Key - Identifier Menu Mode ::
@@ -8629,7 +8633,7 @@ relational databases (part of InfoDock):
 @end group
 @end format
 
-@node Smart Key - Help Buffers, Smart Key - Pages Directory Mode, Smart Key - 
RDB Mode, Smart Keyboard Keys
+@node Smart Key - Help Buffers, Smart Key - Bookmark Mode, Smart Key - RDB 
Mode, Smart Keyboard Keys
 @subsection Smart Key - Help Buffers
 @cindex help buffer
 @format
@@ -8641,7 +8645,24 @@ When pressed at the end of a Help buffer:
 @end group
 @end format
 
-@node Smart Key - Pages Directory Mode, Smart Key - Python Source Code, Smart 
Key - Help Buffers, Smart Keyboard Keys
+@node Smart Key - Bookmark Mode, Smart Key - Pages Directory Mode, Smart Key - 
Help Buffers, Smart Keyboard Keys
+@subsection Smart Key - Bookmark Mode
+
+@format
+@group
+Bookmark-bmenu-mode lists existing per-user Emacs bookmarks, which each link 
to a particular file location.
+
+@noindent
+When pressed on a bookmark-bmenu-mode entry line:
+  ACTION KEY
+     Jumps to the file point linked to by the bookmark.
+  ASSIST KEY
+     Shows what the Action Key does in this context.
+@end group
+@end format
+
+@page
+@node Smart Key - Pages Directory Mode, Smart Key - Python Source Code, Smart 
Key - Bookmark Mode, Smart Keyboard Keys
 @subsection Smart Key - Pages Directory Mode
 
 @format
@@ -8657,7 +8678,6 @@ When pressed on a pages-directory-mode entry line:
 @end group
 @end format
 
-@page
 @node Smart Key - Python Source Code, Smart Key - Identifier Menu Mode , Smart 
Key - Pages Directory Mode, Smart Keyboard Keys
 @subsection Smart Key - Python Source Code
 @format



reply via email to

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