[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole f98ce2a 29/51: Fix colorized display of HyRol
From: |
Stefan Monnier |
Subject: |
[elpa] externals/hyperbole f98ce2a 29/51: Fix colorized display of HyRolo match terms on initial use. |
Date: |
Sun, 12 Jul 2020 18:10:14 -0400 (EDT) |
branch: externals/hyperbole
commit f98ce2a1a38d4873863fa968b098dad40e40c7d4
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
Fix colorized display of HyRolo match terms on initial use.
---
.hypb | Bin 3430 -> 3248 bytes
Changes | 11 ++++++++++-
hbut.el | 12 ++++++++++++
hui-em-but.el | 11 +++++++----
hyrolo.el | 24 ++++++++++++------------
man/hkey-help.txt | 4 ++++
6 files changed, 45 insertions(+), 17 deletions(-)
diff --git a/.hypb b/.hypb
index a10260c..3075990 100644
Binary files a/.hypb and b/.hypb differ
diff --git a/Changes b/Changes
index 985ebd8..59ead9b 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,14 @@
+2020-02-23 Bob Weiner <rsw@gnu.org>
+
+* hbut.el (ibut:act): Added to interactively prompt for and activate named
implicit buttons,
+ <[name]>.
+
2020-02-22 Bob Weiner <rsw@gnu.org>
+* hui-em-but.el (after-init-time): Added setting of hyrolo-highlight-face used
in HyRolo matches
+ so text is highlighted and readable by default (foreground and background
colors of matched
+ text has been the same for some unknown reason. This may affect user
customizations however.
+
* man/hyperbole.texi (Smart Key - Bookmark Mode): Added.
* hpath.el (hpath:file-line-and-column): Added.
@@ -75,7 +84,7 @@ V7.1.0 test release changes ^^^^:
* hui-menu.el (hyperbole-menubar-menu): Removed set-menubar-dirty-flag call.
(hmouse-release-left-edge, hmouse-release-right-edge): Removed
XEmacs code.
-* hkey-help.txt:
+* man/hkey-help.txt:
hmouse-drv.el (action-key-depress, assist-key-depress):
hui-window.el (action-key-modeline, assist-key-modeline):
Modeline window resizing is now handled in action/assist-key-depress via
a call to
diff --git a/hbut.el b/hbut.el
index 6630ebb..054b619 100644
--- a/hbut.el
+++ b/hbut.el
@@ -1226,6 +1226,18 @@ source file for the buttons in the menu, if any.")
;;; ibut class - Implicit Hyperbole Buttons
;;; ========================================================================
+
+(defun ibut:act (label)
+ "Activates Hyperbole implicit button with <[LABEL]> from the current buffer."
+ (interactive (list (hargs:read-match "Activate implicit button labeled: "
+ (ibut:alist)
+ nil t nil 'ibut)))
+ (let* ((lbl-key (hbut:label-to-key label))
+ (but (ibut:get lbl-key)))
+ (if but
+ (hbut:act but)
+ (error "(ibut:act): No implicit button labeled: %s" label))))
+
(defun ibut:alist (&optional file)
"Return alist of labeled ibuts in FILE or the current buffer.
Each element is a list of just an implicit button label. For use
diff --git a/hui-em-but.el b/hui-em-but.el
index 62db858..4700f11 100644
--- a/hui-em-but.el
+++ b/hui-em-but.el
@@ -101,7 +101,7 @@ If `hproperty:but-emphasize-flag' is non-nil when this is
called, emphasize
that button is selectable whenever the mouse cursor moves over it."
(let ((but (make-overlay start end)))
(overlay-put but 'face face)
- (if hproperty:but-emphasize-flag (overlay-put but 'mouse-face
'highlight))))
+ (when hproperty:but-emphasize-flag (overlay-put but 'mouse-face
'highlight))))
(defun hproperty:but-color ()
"Return current color of buffer's buttons."
@@ -115,8 +115,8 @@ that button is selectable whenever the mouse cursor moves
over it."
(let ((start (point-min)))
(while (< start (point-max))
(mapc (lambda (props)
- (if (eq (overlay-get props 'face) hproperty:but-face)
- (delete-overlay props)))
+ (when (eq (overlay-get props 'face) hproperty:but-face)
+ (delete-overlay props)))
(overlays-at start))
(setq start (next-overlay-change start)))))
@@ -468,7 +468,10 @@ highlighted."
(provide 'hui-em-but)
(if after-init-time
- (hproperty:set-face-after-init)
+ (progn
+ ;; Reverse foreground and background colors for default block-style
highlighting.
+ (hproperty:set-item-highlight (hproperty:foreground)
(hproperty:background))
+ (hproperty:set-face-after-init))
(add-hook 'after-init-hook #'hproperty:set-face-after-init))
;;; hui-em-but.el ends here
diff --git a/hyrolo.el b/hyrolo.el
index a3d1af0..934d33d 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -1216,21 +1216,21 @@ HYROLO-BUF may be a file-name, `buffer-name', or
buffer."
(defun hyrolo-format-name (name-str first last)
"Reverse order of NAME-STR field given my regexp match field FIRST and LAST."
- (if (match-beginning last)
- (concat (substring name-str (match-beginning last) (match-end last))
- ", "
- (substring name-str (match-beginning first) (match-end first)))))
+ (when (match-beginning last)
+ (concat (substring name-str (match-beginning last) (match-end last))
+ ", "
+ (substring name-str (match-beginning first) (match-end first)))))
(defun hyrolo-highlight-matches (regexp start end)
"Highlight matches for REGEXP in region from START to END."
- (if (fboundp 'hproperty:but-add)
- (let ((hproperty:but-emphasize-flag))
- (save-excursion
- (goto-char start)
- (while (re-search-forward regexp nil t)
- (hproperty:but-add (match-beginning 0) (match-end 0)
- (or hyrolo-highlight-face
- hproperty:highlight-face)))))))
+ (when (fboundp 'hproperty:but-add)
+ (let ((hproperty:but-emphasize-flag))
+ (save-excursion
+ (goto-char start)
+ (while (re-search-forward regexp nil t)
+ (hproperty:but-add (match-beginning 0) (match-end 0)
+ (or hyrolo-highlight-face
+ hproperty:highlight-face)))))))
(defun hyrolo-isearch-for-regexp (regexp)
"Interactively search forward for the next occurrence of current match
REGEXP.
diff --git a/man/hkey-help.txt b/man/hkey-help.txt
index c567c6d..17ae28c 100644
--- a/man/hkey-help.txt
+++ b/man/hkey-help.txt
@@ -29,6 +29,10 @@ Mouse-only Control
string, list or markup
language tag pair
+ Drag from bottom Modeline Reposition frame as <- same
+ in frame with non-nil drag happens
+ drag-with-mode-line param
+
Drag from shared window side
or from left of scroll bar Resizes window width <- same
Modeline vertical drag Resizes window height <- same
- [elpa] externals/hyperbole 3d26ccb 40/51: Fix require of 'help-mode' instead of 'help' to remedy 'make bin', (continued)
- [elpa] externals/hyperbole 3d26ccb 40/51: Fix require of 'help-mode' instead of 'help' to remedy 'make bin', Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 56e88ca 47/51: Merge branch 'master' of hyperbole, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 2f52190 44/51: Koutliner: Add support for Emacs visual-line commands, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 2253ac2 50/51: V7.1.2 release, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 7184b30 51/51: Fix ibut:delete, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 07c0664 21/51: Org-mode local binding of M-RET activates Hyperbole implicit buttons, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole f2a5c27 22/51: Fixed errors in using hyrolo-logic operators, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole ecc8f36 24/51: Smart Key live window resizing and frame dragging; auto-autoload gen, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole cb7827c 26/51: Swapping buffer improvements; handle grep lines with null separators, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 73fed44 28/51: Fix in-buffer text as ebut label; allow line/col in link-to-file, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole f98ce2a 29/51: Fix colorized display of HyRolo match terms on initial use.,
Stefan Monnier <=
- [elpa] externals/hyperbole 7a14688 30/51: Update manual with bottommost modeline frame drags and Bookmarks, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole bf73086 31/51: Generalize in-buffer button completion UI; Hyperbole manual updates, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 9f9b106 35/51: hypb:replace-match-string): Replace with replace-regexp-in-string, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 7d098e4 37/51: kbd-key:normalize: Rewrote and added support for many more keys, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole c050a69 42/51: kotl/klink.el: (require 'kcell): Removed recursive require loop, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 034d672 45/51: Only url encode the user input to the search (#25), Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 96dcfee 41/51: Bulk of changes for test release 7.1.2, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 2093d3e 48/51: quit-window - Handle primitive functions when replacing this command, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole aa04634 14/51: Handle null key sent to link-to-ibut and ibut:to, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 8c234bf 46/51: Basic coding and documentation updates, Stefan Monnier, 2020/07/12