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

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

[elpa] externals/hyperbole 69c2c7d 4/6: Small syntactic updates


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 69c2c7d 4/6: Small syntactic updates
Date: Mon, 19 Apr 2021 00:57:09 -0400 (EDT)

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

    Small syntactic updates
---
 hibtypes.el  | 15 +++++++++++----
 hycontrol.el |  6 +++---
 hyperbole.el | 39 ++++++++++++++++++++++++---------------
 3 files changed, 38 insertions(+), 22 deletions(-)

diff --git a/hibtypes.el b/hibtypes.el
index 13b28e1..adbac96 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -177,7 +177,14 @@ any buffer attached to a file in `hyrolo-file-list', or 
any buffer with
 ;;; ========================================================================
 
 (defib pathname ()
-  "Make a valid pathname display the path entry.
+  "Make a valid pathname at point display the path entry.
+
+If instead is a PATH-style variable name, .e.g. MANPATH, will prompt
+with completion for one of the paths and will then display that.  If
+it is the colon or semicolon-separated string of paths value from a
+PATH-style variable, the path at point is used; empty paths, e.g. ::
+represent the current directory, '.'.
+
 Also works for delimited and non-delimited remote pathnames,
 Texinfo @file{} entries, and hash-style link references to HTML,
 XML, SGML, Markdown or Emacs outline headings, shell script
@@ -209,7 +216,7 @@ display options."
                  (hact 'link-to-file path))
         ;;
         ;; Match PATH-related Environment and Lisp variable names and
-       ;; to Emacs Lisp and Info files without any directory component.
+       ;; Emacs Lisp and Info files without any directory component.
         (when (setq path (hpath:delimited-possible-path))
           (cond ((and (string-match hpath:path-variable-regexp path)
                      (setq path (match-string 1 path))
@@ -567,8 +574,8 @@ asterisk characters at the very beginning of the line."
                (save-excursion
                  (beginning-of-line)
                  ;; Entry line within a TOC
-                 (when (looking-at "[ \t]+\\*+[ \t]+\\(.*[^ \t]\\)[ \t]*$")
-                   (setq section (match-string-no-properties 1))))
+                 (when (looking-at "[ \t]+\\*+[ \t]+\\(.*\\)$")
+                   (setq section (string-trim (match-string-no-properties 
1)))))
                (progn (ibut:label-set section (match-beginning 1) (match-end 
1))
                       t)
                (save-excursion (re-search-backward
diff --git a/hycontrol.el b/hycontrol.el
index cfb1f98..70486ad 100644
--- a/hycontrol.el
+++ b/hycontrol.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:     1-Jun-16 at 15:35:36
 ;;
-;; Copyright (C) 2016-2017  Free Software Foundation, Inc.
+;; Copyright (C) 2016-2021  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -891,7 +891,7 @@ instead of quitting HyControl."
 ;; turns things on and off.
 (define-minor-mode hycontrol-local-frames-mode
   "Toggle Hyperbole Frames control minor mode in the current buffer."
-  nil " HyFrm" nil
+  :lighter " HyFrm"
   :group 'hyperbole-screen
   :global t)
 
@@ -911,7 +911,7 @@ instead of quitting HyControl."
 ;; turns things on and off.
 (define-minor-mode hycontrol-local-windows-mode
   "Toggle Hyperbole Windows control minor mode in the current buffer."
-  nil " HyWin" nil
+  :lighter " HyWin"
   :group 'hyperbole-screen
   :global t)
 
diff --git a/hyperbole.el b/hyperbole.el
index d5bc877..073a7db 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -1,4 +1,4 @@
-;;; hyperbole.el --- GNU Hyperbole: The Everyday Hypertextual Information 
Manager
+;;; hyperbole.el --- GNU Hyperbole: The Everyday Hypertextual Information 
Manager  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1992-2021  Free Software Foundation, Inc.
 
@@ -169,7 +169,11 @@ See `hkey-binding-entry' for format.")
   "True if Hyperbole key bindings are in use, else nil.")
 
 (defvar hkey-previous-bindings nil
-  "List of global key sequences and their pre-Hyperbole bindings that 
Hyperbole has overridden.
+  ;; !! FIXME: We should probably instead use a keymap that we just add/remove
+  ;; from the `global-map' so we don't actually modify any keybindings (and
+  ;; hence don't need this var)?
+  "List of bindings that Hyperbole has overridden.
+Holds the global key sequences and their pre-Hyperbole bindings.
 See `hkey-binding-entry' for format.")
 
 (defun hkey-binding-entry (key)
@@ -192,6 +196,10 @@ Entry format is: (key-description key-sequence 
key-binding)."
     (add-to-list 'hkey-previous-bindings (hkey-binding-entry key)))
   (global-set-key key command))
 
+(defvar hmouse-middle-flag)
+(defvar hmouse-bindings-flag)
+(defvar hyperb:user-email)
+
 (defun hkey-initialize ()
   "If `hkey-init' is non-nil, initialize Hyperbole key bindings."
   (when hkey-init
@@ -476,10 +484,10 @@ With optional ARG, override them iff ARG is positive."
 ;; Menu items could call this function before Info is loaded.
 (autoload 'Info-goto-node   "info"       "Jump to specific Info node."  t)
 
-;;; Hyperbole user interface entry points that trigger loading of the
-;;; full Hyperbole system.  These are left commented here for
-;;; reference in case we ever go back to autoloading Hyperbole rather
-;;; than initializing it fully in this file.
+;; Hyperbole user interface entry points that trigger loading of the
+;; full Hyperbole system.  These are left commented here for
+;; reference in case we ever go back to autoloading Hyperbole rather
+;; than initializing it fully in this file.
 
 ;; ;; Action type definitions.
 ;; (autoload 'defact            "hyperbole"
@@ -535,8 +543,8 @@ With optional ARG, override them iff ARG is positive."
 ;; (autoload 'hpath:find-other-window "hyperbole"
 ;;       "Edit file FILENAME in other window, possibly using a special 
command." t)
 
-;;; Auto-autoload doesn't work for next item because it is defined
-;;; within a condition-case, so autoload it here.
+;; Auto-autoload doesn't work for next item because it is defined
+;; within a condition-case, so autoload it here.
 (autoload 'Vm-init    "hvm"    "Initializes Hyperbole Vm support." t)
 
 ;;; ************************************************************************
@@ -615,15 +623,15 @@ If FLAG is nil then text is shown, while if FLAG is t the 
text is hidden."
 ;; Use any obsolete URL setting from earlier Hyperbole releases to set the
 ;; new URL browsing variable.
 (if (and (boundp 'action-key-url-function) action-key-url-function)
-    (cond ((eq action-key-url-function 'w3-fetch)
-          (setq browse-url-browser-function 'browse-url-w3))
+    (cond ((eq action-key-url-function #'w3-fetch)
+          (setq browse-url-browser-function #'browse-url-w3))
          ((eq action-key-url-function
-              'highlight-headers-follow-url-netscape)
-          (setq browse-url-browser-function 'browse-url-netscape
+              #'highlight-headers-follow-url-netscape)
+          (setq browse-url-browser-function #'browse-url-netscape
                 browse-url-new-window-flag nil))
          ((eq action-key-url-function
-              'highlight-headers-follow-url-netscape-new-window)
-          (setq browse-url-browser-function 'browse-url-netscape
+              #'highlight-headers-follow-url-netscape-new-window)
+          (setq browse-url-browser-function #'browse-url-netscape
                 browse-url-new-window-flag t))))
 
 ;;; ************************************************************************
@@ -724,9 +732,10 @@ This is used only when running from git source and not a 
package release."
           (hyperb:init)
         ;; Initialize after other key bindings are loaded at startup.
         (add-hook 'after-init-hook #'hyperb:init t))
-    ;; FIXME: hyperb:uninit?
+    ;; !! FIXME: hyperb:uninit? - write this
     (remove-hook 'after-init-hook #'hyperb:init)))
 
+;; !! FIXME: Loading a file should not change Emacs's behavior.
 (hyperbole-mode 1)
 
 (makunbound 'hyperbole-loading)



reply via email to

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