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

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

[elpa] externals/hyperbole e999fc7 21/50: Stop man-apropos from matching


From: Stefan Monnier
Subject: [elpa] externals/hyperbole e999fc7 21/50: Stop man-apropos from matching to log file entries
Date: Wed, 17 Mar 2021 18:44:16 -0400 (EDT)

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

    Stop man-apropos from matching to log file entries
---
 Changes      |  9 +++++++++
 hibtypes.el  |  2 +-
 hsettings.el | 26 ++++++++++++++++++++++++++
 hyperbole.el | 26 --------------------------
 4 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/Changes b/Changes
index 6e0da32..05267e2 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,12 @@
+2020-11-08  Bob Weiner  <rsw@gnu.org>
+
+* hsettings.el (hyperbole-toggle-messaging): Moved from hyperbole.el
+    to here to prevent unknown function error during package byte
+    compilation.
+
+* hibtypes.el (man-apropos): Prevented matches to log lines like:
+    WARNING: (func-name) - warning description
+
 <<<<<<< Updated upstream
 2020-11-02  Mats Lidell  <matsl@gnu.org>
 
diff --git a/hibtypes.el b/hibtypes.el
index 45db439..23e8547 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -634,7 +634,7 @@ Requires the Emacs builtin Tramp library for ftp file 
retrievals."
   "Make man apropos entries display associated man pages when selected."
   (save-excursion
     (beginning-of-line)
-    (let ((nm "[^ \t\n\r!@,][^ \t\n\r,]*")
+    (let ((nm "[^ \t\n\r!@,:;(){}][^ \t\n\r,(){}]*[^ \t\n\r@.,:;(){}]")
           topic)
       (and (looking-at
             (concat
diff --git a/hsettings.el b/hsettings.el
index 1ced82c..9402e62 100644
--- a/hsettings.el
+++ b/hsettings.el
@@ -164,6 +164,32 @@ package to display search results."
                   (browse-url-url-encode-chars search-term "[*\"()',=;?% ]"))))
       (user-error "(Hyperbole): Invalid web search service `%s'" 
service-name))))
 
+;; This must be defined before the defcustom `inhbit-hyperbole-messaging'.
+;;;###autoload
+(defun hyperbole-toggle-messaging (&optional arg)
+  "Toggle Hyperbole support for explicit buttons in mail and news buffers.
+Toggles the boolean variable `inhibit-hyperbole-messaging’ and either
+adds hooks (nil value) or removes them (t value).
+
+With optional prefix ARG > 0, enables support.  If ARG <= 0,
+disables/inhibits support."
+  (interactive "P")
+  (setq inhibit-hyperbole-messaging (if (null arg)
+                                       (not inhibit-hyperbole-messaging)
+                                     (<= (prefix-numeric-value arg) 0)))
+  (if inhibit-hyperbole-messaging
+      (var:remove-all)
+    (var:append-all)
+    ;; Add any hooks that were skipped when inhibit-hyperbole-messaging
+    ;; was nil.
+    (cond ((boundp 'hyperbole-loading))
+         ((not after-init-time)
+          (add-hook 'after-init-hook (lambda () (load "hyperbole"))))
+         (t (load "hyperbole"))))
+  (if (called-interactively-p 'interactive)
+      (message "Hyperbole messaging button support is %s"
+              (if inhibit-hyperbole-messaging "disabled" "enabled"))))
+
 (defcustom inhibit-hyperbole-messaging t
   "*Determine whether Hyperbole supports explicit buttons in mail and news 
buffers.
 The default of t means disable such support (work remains to
diff --git a/hyperbole.el b/hyperbole.el
index 7d6e4f4..8695224 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -121,32 +121,6 @@
                            t)))
     (error "(Hyperbole): Startup failure: `hyperb:dir' must be manually added 
to `load-path' to fix")))
 
-;; This must be defined before the defcustom `inhbit-hyperbole-messaging'.
-;;;###autoload
-(defun hyperbole-toggle-messaging (&optional arg)
-  "Toggle Hyperbole support for explicit buttons in mail and news buffers.
-Toggles the boolean variable `inhibit-hyperbole-messaging’ and either
-adds hooks (nil value) or removes them (t value).
-
-With optional prefix ARG > 0, enables support.  If ARG <= 0,
-disables/inhibits support."
-  (interactive "P")
-  (setq inhibit-hyperbole-messaging (if (null arg)
-                                       (not inhibit-hyperbole-messaging)
-                                     (<= (prefix-numeric-value arg) 0)))
-  (if inhibit-hyperbole-messaging
-      (var:remove-all)
-    (var:append-all)
-    ;; Add any hooks that were skipped when inhibit-hyperbole-messaging
-    ;; was nil.
-    (cond ((boundp 'hyperbole-loading))
-         ((not after-init-time)
-          (add-hook 'after-init-hook (lambda () (load "hyperbole"))))
-         (t (load "hyperbole"))))
-  (if (called-interactively-p 'interactive)
-      (message "Hyperbole messaging button support is %s"
-              (if inhibit-hyperbole-messaging "disabled" "enabled"))))
-
 (defgroup hyperbole-koutliner nil
   "Hyperbole multi-level autonumbered outliner customizations."
   :group 'hyperbole)



reply via email to

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