From 2aa124144ef49d67b09dbe147992879d29554cb7 Mon Sep 17 00:00:00 2001 From: Bob Weiner Date: Sun, 26 Nov 2017 12:34:11 -0500 Subject: Delete hkey-ace-window-setup bindings before rebinding; fixed hkey-throw split line typo and hycontrol-frame-offset typo * hmouse-drv.el (hkey-ace-window-setup): Added deletion of i and t command bindings before adding them to aw-dispatch-alist. (hkey-throw): Fixed split line code typo here. hycontrol.el (hycontrol-frame-offset): Fixed typo. --- Changes | 11 +++++++++++ hmouse-drv.el | 5 +++-- hycontrol.el | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 47e574d..7a4326f 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,14 @@ +2017-11-26 Bob Weiner + +* hmouse-drv.el (hkey-ace-window-setup): Added deletion of i and t command bindings before + adding them to aw-dispatch-alist. + (hkey-throw): Fixed split line code typo here. + hycontrol.el (hycontrol-frame-offset): Fixed typo. + +============================================================================== +V7.0.3 changes ^^^^: +============================================================================== + 2017-11-23 Bob Weiner * hversion.el: Released 7.0.2. diff --git a/hmouse-drv.el b/hmouse-drv.el index 318b62e..842044d 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -383,8 +383,7 @@ Only works when running under a window system, not from a dumb terminal." ;; release-win are the same. (hkey-drag release-window) (error (when (eq start-win release-window) - (hmouse-drag-item-to-displ - ay)))) + (hmouse-drag-item-to-display)))) (when (window-live-p start-win) (select-window start-win)))) (defun hkey-ace-window-setup (&optional key) @@ -413,6 +412,8 @@ window, use {M-o i } and watch the magic happen." (require 'ace-window) (when key (global-set-key key 'ace-window)) + (setq aw-dispatch-alist (delq (assq ?t aw-dispatch-alist) + (delq (assq ?i aw-dispatch-alist) aw-dispatch-alist))) (push '(?i hkey-drag-to "Hyperbole Drag To") aw-dispatch-alist) (push '(?t hkey-throw "Hyperbole Throw") aw-dispatch-alist) (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) diff --git a/hycontrol.el b/hycontrol.el index f4e72dd..165ce8c 100644 --- a/hycontrol.el +++ b/hycontrol.el @@ -151,7 +151,7 @@ major-mode 'c-mode).") :group 'hyperbole-screen) (defcustom hycontrol-invert-mode-line-flag t - "When t (default) and in a HyControl mode, invert mode-line to emphasize the special key bindings in effect." + "*When t (default) and in a HyControl mode, invert mode-line to emphasize the special key bindings in effect." :type 'boolean :group 'hyperbole-screen) @@ -170,7 +170,7 @@ The unit counter resets to the last digit entered whenever this value is exceede (defcustom hycontrol-frame-offset '(13 . 23) "*Increase in pixel offset for new hycontrol frames relative to the selected frame. -It's value is an (x-offset . y-offset) pair in pixels." +Its value is an (x-offset . y-offset) pair in pixels." :type '(cons integer integer) :group 'hyperbole-screen) -- cgit v1.0 From 751121f50deadec04bda2261919187fc4f8779e7 Mon Sep 17 00:00:00 2001 From: Bob Weiner Date: Tue, 12 Dec 2017 19:34:09 -0500 Subject: 7.0.2a test update: company completion support; ripgrep match handling; directional movement of buffers across windows; hkey-{drag, replace, swap, throw} commands integrated with ace-window; hmouse-click commands to perform cross-window drags, replacements and throws with 3 mouse clicks; * hversion.el: Pushed 7.0.2a test update. * hmouse-drv.el (hkey-throw): Modified to show a message if the frame of release is different than the frame of depress, since this frame is typically hidden by the depress frame. * hmouse-tag.el (smart-lisp-mode-p): Added change-log-mode since such files often contain Lisp references. * hypb.el (hypb:select-window-frame): Added and used in hmouse-item-to-window. (hypb:save-selected-window-and-input-focus): Added and used in hkey-throw. * kotl/kotl-mode.el (kotl-mode): Fixed setq close paren error that skipped 4 settings of paragraph-start, selective-display, selective-display-ellipses and track-eol. 2017-12-10 Bob Weiner * man/hyperbole.texi (Menu Commands, HyRolo Menu): Documented how to invoke the Koutliner and HyRolo popup menus in Emacs. * hyrolo-menu.el (hyrolo-menubar-menu): kotl/kmenu.el (kotl-menubar-menu): For GNU Emacs, use standard binding of C-mouse-3 to popup mode-specific menu instead of mouse-3. 2017-12-08 Bob Weiner * hmouse-drv.el (hkey-ace-window-setup): Autoloaded since might be added to an init file before Hyperbole is loaded. * hycontrol.el (hycontrol-quit-frames-mode, hycontrol-quit-windows-mode): Added conditionals to allow for quitting from help buffers with {q} while remaining in HyControl, e.g. if display a key binding help window. Added {Q} binding to unconditionally quit from HyControl. * hmouse-drv.el (hkey-buffer-move): Added directional movement commands that call this function. hkey-buffer-move-left, hkey-buffer-move-right, hkey-buffer-move-down and hkey-buffer-move-up. 2017-12-07 Bob Weiner * hload-path.el (hyperb:emacs-p): Removed Emacs19 test. (hyperb:kotl-p): Removed since all versions of Emacs in use now support the Koutliner. * hlvar.el - Removed this since colons are now handled by Emacs 26 in local variable names. * hypb.el (hypb:rgrep): Added support for ripgrep. hibtypes.el (ripgrep-msg): Added implicit button support for ripgrep (rg) messages where the associated pathname is output once before all mataching lines. See "https://github.com/BurntSushi/ripgrep". 2017-12-04 Bob Weiner * hmouse-drv.el (hmouse-alist): Reload the def of this variable if its value is null. (hkey-mouse-click-to-replace): Added to allow moving buffers with the mouse by clicking on the from and to windows. (hmouse-click-to-drag, hmouse-click-to-drag-to, hmouse-click-to-replace, hmouse-click-to-throw, hmouse-choose-windows): Added to perform cross-window drags, replacements and throws with 3 mouse clicks. 2017-12-03 Bob Weiner * hui-treemacs.el: Removed replacements for treemacs functions; as of Treemacs 1.14, all needed changes are included. 2017-12-01 Bob Weiner * hmouse-drv.el (hkey-drag-stay, hkey-replace): Added for use as ace-window commands. (hkey-throw): Rewrote so if not on an item, then throws the current buffer. hkey-replace is the inverse, it grabs the specified buffer and places it into the selected window ({p} command key for ace-window). hkey-drag-stay does a drag but leaves point in the originally selected window. (hmouse-click-to-drag, hmouse-click-to-drag-stay, hmouse-click-to-drag-to) hmouse-click-to-replace, hmouse-click-to-swap, hmouse-click-to-throw): Added to click with the mouse twice on two different windows to select the windows using hmouse-choose-windows. (hkey-drag, hkey-drag-stay, hkey-drag-to, hkey-replace, hkey-swap, hkey-throw): Added and made interactive with ace-window window parameter selection. (hkey-buffer-to): Added to copy a buffer from-window to-window, using ace-window to select the windows. (hkey-swap-buffers): Added to swap buffers between from-window and to-window, using ace-window to select the windows. * hui-treemacs.el (smart-treemacs): Added standard Hyperbole end-of-line scrolling support. * hui-mouse.el (smart-company-to-definition, smart-company-help): Added to support company completion mode. hmouse-sh.el (hmouse-shifted-setup, hmouse-unshifted-setup): Added Action and Assist Key local bindings for company-mode for GNU Emacs. 2017-11-30 Bob Weiner * man/hyperbole.texi (Glossary): Added Jedi item with link to its home page. Added link to the OO-Browser home page in its item. * hmouse-tag.el (smart-python-jedi-to-definition-p): Added and called in smart-python to use the Jedi package when its server is running. It jumps to the proper definition of multi-level module references definitions, e.g. a.b.c. Also fixed error where the default action was not jumping to a tag definition at point because it was testing that the identifier parameter was non-nil (no identifier is sent in such usage). * hui-mouse.el (hkey-alist): Moved smart-python prior to Imenu for more advanced definition lookups * hyperbole.el (temp-buffer-show-hook, temp-buffer-show-function): Added Hyperbole hkey-help-show function rather than replacing any existing hook values. 2017-11-29 Bob Weiner * hibtypes.el (markdown-internal-link): Rewrote (and added support functions) to handle markdown infile links properly. Previous use of markdown-do was removed because that now does things other than following links. 2017-11-28 Bob Weiner * hmouse-drv.el (hkey-help-show): Added conditionals to support org-mode org-goto *Org Help* buffer properly. 2017-11-27 Bob Weiner * hmouse-drv.el (hkey-ace-window-setup): Made new ace-window frames (window id = z) inherit the size of the prior selected frame; same as HyWindow. * hui-window.el (hmouse-kill-and-yank-region, hmouse-yank-region): Added select-frame-set-input-focus in case released in a different frame. 2017-11-26 Bob Weiner * hmouse-drv.el (hkey-throw): Restored input focus to start-win rather than just making it the selected window. (hkey-drag-to): Fixed predicate test to call hmouse-at-item-p instead of hmouse-drag-item-to-display and set input focus to release-window if dragging an item. --- Changes | 127 +++++++++++++++ DEMO | 11 +- HY-ABOUT | 2 +- HY-COPY | 2 +- HY-WHY.kotl | 4 +- MANIFEST | 1 - Makefile | 6 +- README.md | 4 +- README.md.html | 2 +- hibtypes.el | 121 +++++++++++--- hload-path.el | 34 +--- hlvar.el | 138 ---------------- hmouse-drv.el | 470 ++++++++++++++++++++++++++++++++++++++++------------- hmouse-sh.el | 15 +- hmouse-tag.el | 28 +++- hsettings.el | 18 +- hui-menu.el | 47 +++--- hui-mini.el | 68 ++++---- hui-mouse.el | 49 +++++- hui-treemacs.el | 153 ++--------------- hui-window.el | 12 +- hversion.el | 4 +- hycontrol.el | 26 ++- hypb.el | 26 ++- hyperbole-pkg.el | 2 +- hyperbole.el | 16 +- hyrolo-menu.el | 4 +- hywconfig.el | 6 +- kotl/kmenu.el | 4 +- kotl/kotl-mode.el | 10 +- man/hyperbole.html | 186 +++++++++++++-------- man/hyperbole.info | Bin 487960 -> 489710 bytes man/hyperbole.pdf | Bin 1260426 -> 1263857 bytes man/hyperbole.texi | 123 ++++++++------ man/version.texi | 8 +- 35 files changed, 1028 insertions(+), 699 deletions(-) delete mode 100644 hlvar.el diff --git a/Changes b/Changes index 7a4326f..2911def 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,132 @@ +2017-12-12 Bob Weiner + +* hversion.el: Pushed 7.0.2a test update. + +* hmouse-drv.el (hkey-throw): Modified to show a message if the frame of release is + different than the frame of depress, since this frame is typically hidden by + the depress frame. + +* hmouse-tag.el (smart-lisp-mode-p): Added change-log-mode since such files often contain + Lisp references. + +* hypb.el (hypb:select-window-frame): Added and used in hmouse-item-to-window. + (hypb:save-selected-window-and-input-focus): Added and used in hkey-throw. + +* kotl/kotl-mode.el (kotl-mode): Fixed setq close paren error that skipped 4 settings of + paragraph-start, selective-display, selective-display-ellipses and track-eol. + +2017-12-10 Bob Weiner + +* man/hyperbole.texi (Menu Commands, HyRolo Menu): Documented how to invoke the Koutliner and + HyRolo popup menus in Emacs. + +* hyrolo-menu.el (hyrolo-menubar-menu): + kotl/kmenu.el (kotl-menubar-menu): For GNU Emacs, use standard binding of C-mouse-3 to popup + mode-specific menu instead of mouse-3. + +2017-12-08 Bob Weiner + +* hmouse-drv.el (hkey-ace-window-setup): Autoloaded since might be added to an init file + before Hyperbole is loaded. + +* hycontrol.el (hycontrol-quit-frames-mode, hycontrol-quit-windows-mode): Added conditionals + to allow for quitting from help buffers with {q} while remaining in HyControl, e.g. if + display a key binding help window. Added {Q} binding to unconditionally quit from HyControl. + +* hmouse-drv.el (hkey-buffer-move): Added directional movement commands that call this function. + hkey-buffer-move-left, hkey-buffer-move-right, hkey-buffer-move-down and hkey-buffer-move-up. + +2017-12-07 Bob Weiner + +* hload-path.el (hyperb:emacs-p): Removed Emacs19 test. + (hyperb:kotl-p): Removed since all versions of Emacs in use now support the Koutliner. + +* hlvar.el - Removed this since colons are now handled by Emacs 26 in local variable names. + +* hypb.el (hypb:rgrep): Added support for ripgrep. + hibtypes.el (ripgrep-msg): Added implicit button support for ripgrep (rg) messages where + the associated pathname is output once before all mataching lines. + See "https://github.com/BurntSushi/ripgrep". + +2017-12-04 Bob Weiner + +* hmouse-drv.el (hmouse-alist): Reload the def of this variable if its value is null. + (hkey-mouse-click-to-replace): Added to allow moving buffers with the mouse by clicking + on the from and to windows. + (hmouse-click-to-drag, hmouse-click-to-drag-to, hmouse-click-to-replace, hmouse-click-to-throw, + hmouse-choose-windows): Added to perform cross-window drags, replacements and throws with 3 mouse + clicks. + +2017-12-03 Bob Weiner + +* hui-treemacs.el: Removed replacements for treemacs functions; as of Treemacs 1.14, all needed changes are + included. + +2017-12-01 Bob Weiner + +* hmouse-drv.el (hkey-drag-stay, hkey-replace): Added for use as ace-window commands. + (hkey-throw): Rewrote so if not on an item, then throws the current buffer. + hkey-replace is the inverse, it grabs the specified buffer and places it into the selected + window ({p} command key for ace-window). hkey-drag-stay does a drag but leaves point + in the originally selected window. + (hmouse-click-to-drag, hmouse-click-to-drag-stay, hmouse-click-to-drag-to) + hmouse-click-to-replace, hmouse-click-to-swap, hmouse-click-to-throw): Added to click + with the mouse twice on two different windows to select the windows using hmouse-choose-windows. + (hkey-drag, hkey-drag-stay, hkey-drag-to, hkey-replace, hkey-swap, hkey-throw): Added and + made interactive with ace-window window parameter selection. + (hkey-buffer-to): Added to copy a buffer from-window to-window, using ace-window + to select the windows. + (hkey-swap-buffers): Added to swap buffers between from-window and to-window, using ace-window + to select the windows. + +* hui-treemacs.el (smart-treemacs): Added standard Hyperbole end-of-line scrolling support. + +* hui-mouse.el (smart-company-to-definition, smart-company-help): Added to support company completion mode. + hmouse-sh.el (hmouse-shifted-setup, hmouse-unshifted-setup): Added Action and Assist Key local bindings + for company-mode for GNU Emacs. + +2017-11-30 Bob Weiner + +* man/hyperbole.texi (Glossary): Added Jedi item with link to its home page. Added link to the OO-Browser + home page in its item. + +* hmouse-tag.el (smart-python-jedi-to-definition-p): Added and called in smart-python to use the Jedi + package when its server is running. It jumps to the proper definition of multi-level module + references definitions, e.g. a.b.c. Also fixed error where the default action was not jumping to + a tag definition at point because it was testing that the identifier parameter was non-nil (no + identifier is sent in such usage). + +* hui-mouse.el (hkey-alist): Moved smart-python prior to Imenu for more advanced definition lookups + +* hyperbole.el (temp-buffer-show-hook, temp-buffer-show-function): Added Hyperbole hkey-help-show + function rather than replacing any existing hook values. + +2017-11-29 Bob Weiner + +* hibtypes.el (markdown-internal-link): Rewrote (and added support functions) to handle markdown + infile links properly. Previous use of markdown-do was removed because that now does things + other than following links. + +2017-11-28 Bob Weiner + +* hmouse-drv.el (hkey-help-show): Added conditionals to support org-mode org-goto *Org Help* buffer + properly. + +2017-11-27 Bob Weiner + +* hmouse-drv.el (hkey-ace-window-setup): Made new ace-window frames (window id = z) inherit the size + of the prior selected frame; same as HyWindow. + +* hui-window.el (hmouse-kill-and-yank-region, hmouse-yank-region): Added select-frame-set-input-focus + in case released in a different frame. + 2017-11-26 Bob Weiner +* hmouse-drv.el (hkey-throw): Restored input focus to start-win rather than just making it + the selected window. + (hkey-drag-to): Fixed predicate test to call hmouse-at-item-p instead of + hmouse-drag-item-to-display and set input focus to release-window if dragging an item. + * hmouse-drv.el (hkey-ace-window-setup): Added deletion of i and t command bindings before adding them to aw-dispatch-alist. (hkey-throw): Fixed split line code typo here. diff --git a/DEMO b/DEMO index d39f2ab..a8e650c 100644 --- a/DEMO +++ b/DEMO @@ -214,12 +214,13 @@ Hyperbole minibuffer menu item, Screen/WindowsControl {C-h h s w}, will do the same thing. Once in HyControl, your minibuffer window at the bottom of the selected frame + will display a summary of keys you may use to adjust your windows until you -press {q} to quit from HyControl. If you don't see it, press {?}, to turn on -this help display. The key, {t}, will always switch you between controlling -frames and windows, the minor modes of HyControl, with a modeline indicator -of either "HyFrm" or HyWin" depending on which type of control is active. -See "(hyperbole)HyControl" for full usage information. +press {q} or {Q} to quit from HyControl. If you don't see it, press {?}, to +turn on this help display. The key, {t}, will always switch you between +controlling frames and windows, the minor modes of HyControl, with a modeline +indicator of either "HyFrm" or HyWin" depending on which type of control is +active. See "(hyperbole)HyControl" for full usage information. ** Frame Commands diff --git a/HY-ABOUT b/HY-ABOUT index 108ec33..0bf1893 100644 --- a/HY-ABOUT +++ b/HY-ABOUT @@ -3,7 +3,7 @@ Designed and Written by Bob Weiner Maintained by Mats Lidell and Bob Weiner https://www.gnu.org/software/hyperbole/ - Version 7.0.2 + Version 7.0.2a GNU Hyperbole (pronounced Ga-new Hi-per-bo-lee), or just Hyperbole, is an efficient and programmable hypertextual information management diff --git a/HY-COPY b/HY-COPY index e74946d..91c7c86 100644 --- a/HY-COPY +++ b/HY-COPY @@ -4,7 +4,7 @@ The following copyright applies to the GNU Hyperbole software. -Copyright (C) 1989-2016 Free Software Foundation, Inc. +Copyright (C) 1989-2017 Free Software Foundation, Inc. Originally developed with support from Motorola Inc., who donated all such work to the Free Software Foundation, Inc. in the 1990s. diff --git a/HY-WHY.kotl b/HY-WHY.kotl index 5bbfba2..d363ad5 100644 --- a/HY-WHY.kotl +++ b/HY-WHY.kotl @@ -51,7 +51,7 @@ presses. These selectable things include: delimited pairs of (), @{@}, <>, [] and quote marks, source code functions, source code comments and matching tag pairs in HTML and SGML modes. - See "DEMO#Thing Selection". + See "DEMO#Thing Selection". 10. Use the fantastic, auto-numbered Koutliner with per-item links and rapidly changeable views. See "DEMO#Koutliner". @@ -115,7 +115,7 @@ alpha ;; label-type  ;; depth-first kcell attributes [[0 - (creator "rsw@gnu.org" create-time "20171122:02:34:20" id-counter 37 file "/Users/bk/Dropbox/emacs/hyperbole/HY-WHY.kotl")] + (creator "rsw@gnu.org" create-time "20171212:19:44:57" id-counter 37 file "/Users/bk/Dropbox/emacs/hyperbole/HY-WHY.kotl")] [1 (creator "rsw@gnu.org" create-time "20160524:15:04:17" no-fill t)] [17 diff --git a/MANIFEST b/MANIFEST index afd6d16..6e5cd62 100644 --- a/MANIFEST +++ b/MANIFEST @@ -84,7 +84,6 @@ hib-kbd.el - Implicit button type for key sequences delimited with {} hib-social.el - Implicit button type for social media/git hashtag and username references hinit.el - Standard initializations for GNU Hyperbole hload-path.el - GNU Hyperbole load-path setup -hlvar.el - GNU Hyperbole variables in local variable lists hsettings.el - Hyperbole settings which may require customization hvar.el - Variable manipulation routines for GNU Hyperbole hyperbole-banner.png- Graphic of GNU Hyperbole for display with About Hyperbole diff --git a/Makefile b/Makefile index c04dbd8..637283d 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ # This ver setup won't work under any make except GNU make, so set it manually. #HYPB_VERSION = "`head -3 hversion.el | tail -1 | sed -e 's/.*|\(.*\)|.*/\1/'`" -HYPB_VERSION = 7.0.2 +HYPB_VERSION = 7.0.2a # Emacs executable used to byte-compile .el files into .elc's. # Possibilities include: emacs, infodock, xemacs, etc. @@ -146,7 +146,7 @@ EL_SRC = hui-em-but.el hui-xe-but.el EL_COMPILE = hact.el hactypes.el hargs.el hbdata.el hbmap.el hbut.el \ hgnus.el hhist.el hib-debbugs.el hib-doc-id.el hib-kbd.el \ hib-social.el hibtypes.el \ - hinit.el hload-path.el hlvar.el hmail.el hmh.el hmoccur.el hmouse-info.el \ + hinit.el hload-path.el hmail.el hmh.el hmoccur.el hmouse-info.el \ hmouse-drv.el hmouse-key.el hmouse-mod.el hmouse-sh.el hmouse-tag.el \ hpath.el hrmail.el hsettings.el hsmail.el hsys-org.el hsys-www.el htz.el \ hycontrol.el hui-jmenu.el hui-menu.el hui-mini.el hui-mouse.el hui-select.el \ @@ -161,7 +161,7 @@ EL_KOTL = kotl/kexport.el kotl/kfile.el kotl/kfill.el kotl/kimport.el kotl/klabe ELC_COMPILE = hactypes.elc hibtypes.elc hib-debbugs.elc hib-doc-id.elc hib-kbd.elc \ hib-social.elc hact.elc \ hargs.elc hbdata.elc hbmap.elc hbut.elc hgnus.elc hhist.elc \ - hinit.elc hload-path.elc hlvar.elc hmail.elc hmh.elc hmoccur.elc hmouse-info.elc \ + hinit.elc hload-path.elc hmail.elc hmh.elc hmoccur.elc hmouse-info.elc \ hmouse-drv.elc hmouse-key.elc hmouse-mod.elc hmouse-sh.elc hmouse-tag.elc \ hpath.elc hrmail.elc hsettings.elc hsmail.elc hsys-org.elc hsys-www.elc htz.elc \ hycontrol.elc hui-jmenu.elc hui-menu.elc hui-mini.elc hui-mouse.elc hui-select.elc \ diff --git a/README.md b/README.md index e8ff739..21373a9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# GNU Hyperbole 7.0.2 - The Everyday Hypertextual Information Manager +# GNU Hyperbole 7.0.2a - The Everyday Hypertextual Information Manager **Table of Contents** - [Summary](#summary) - [Mailing Lists](#mailing-lists) -- [Ftp and Git Repository Downloads](#ftp-and-git) +- [Ftp and Git Repository Downloads](#ftp-and-git-repository-downloads) - [Installation](#installation) - [Invocation](#invocation) - [Hyperbole Components](#hyperbole-components) diff --git a/README.md.html b/README.md.html index 43867b3..69f0f2b 100644 --- a/README.md.html +++ b/README.md.html @@ -1,5 +1,5 @@

-GNU Hyperbole 7.0.2 - The Everyday Hypertextual Information Manager

+GNU Hyperbole 7.0.2 - The Everyday Hypertextual Information Manager

Table of Contents

    diff --git a/hibtypes.el b/hibtypes.el index c908cc5..47af123 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 19-Sep-91 at 20:45:31 ;; -;; Copyright (C) 1991-2016 Free Software Foundation, Inc. +;; Copyright (C) 1991-2017 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -302,6 +302,45 @@ must have an attached file." ;;; Displays in-file Markdown link referents. ;;; ======================================================================== +(defun markdown-follow-link-p () + "Jumps between reference links and definitions; between footnote markers and footnote text. +Returns t if jumps and nil otherwise." + (cond + ;; Footnote definition + ((markdown-footnote-text-positions) + (markdown-footnote-return) + t) + ;; Footnote marker + ((markdown-footnote-marker-positions) + (markdown-footnote-goto-text) + t) + ;; Reference link + ((thing-at-point-looking-at markdown-regex-link-reference) + (markdown-reference-goto-definition) + t) + ;; Reference definition + ((thing-at-point-looking-at markdown-regex-reference-definition) + (markdown-reference-goto-link (match-string-no-properties 2)) + t))) + +(defun markdown-follow-inline-link-p (opoint) + "Test to see if on an inline link, jump to its referent if it is absolute (not relative within the file), otherwise return to OPOINT." + (skip-chars-forward "^\]\[()") + (if (looking-at "\][\[()]") + (progn (if (looking-at "\(") + (skip-chars-backward "^\]\[()") + (skip-chars-forward "\]\[\(")) + ;; Leave point on the link even if not activated + ;; here, so that code elsewhere activates it. + (if (and (markdown-link-p) + (not (or (hpath:www-at-p) (hpath:at-p)))) + ;; In-file referents will be handled later by the + ;; pathname implicit type, not here. + (progn (hpath:display-buffer (current-buffer)) + (hact 'markdown-follow-link-at-point)))) + (goto-char opoint) + nil)) + (defib markdown-internal-link () "Displays any in-file Markdown link referent. Pathnames and urls are handled elsewhere." (when (and (eq major-mode 'markdown-mode) @@ -310,26 +349,17 @@ must have an attached file." npoint) (cond ((markdown-link-p) (condition-case () - ;; Follows a reference link to its referent. - (progn (markdown-do) - (when (/= opoint (point)) - (setq npoint (point)) - (goto-char opoint) - (hact 'link-to-file buffer-file-name npoint))) + ;; Follows a reference link or footnote to its referent. + (if (markdown-follow-link-p) + (when (/= opoint (point)) + (setq npoint (point)) + (goto-char opoint) + (hact 'link-to-file buffer-file-name npoint)) + ;; Follows an infile link. + (markdown-follow-inline-link-p opoint)) ;; May be on the name of an inline link, so move to the ;; link itself and follow that. - (error - (skip-chars-forward "^\]\[()") - (if (looking-at "\][\[\(]") - (progn (skip-chars-forward "\]\[\(") - ;; Leave point on the link even if not activated - ;; here, so that code elsewhere activates it. - (if (and (markdown-link-p) - (not (or (hpath:www-at-p) (hpath:at-p)))) - (progn (hpath:display-buffer (current-buffer)) - (hact 'markdown-follow-link-at-point)))) - (goto-char opoint) - nil)))) + (error (markdown-follow-inline-link-p opoint)))) ((markdown-wiki-link-p) (hpath:display-buffer (current-buffer)) (hact 'markdown-follow-wiki-link-at-point)))))) @@ -604,16 +634,60 @@ Requires the Emacs builtin Tramp library for ftp file retrievals." ;;; Follows links to Hyperbole Koutliner cells. ;;; ======================================================================== -(if hyperb:kotl-p (require 'klink)) +(require 'klink) ;;; ======================================================================== ;;; Jumps to source line associated with grep or compilation error messages. +;;; Also supports ripgrep (rg command). ;;; With credit to Michael Lipp and Mike Williams for the idea. ;;; ======================================================================== +(defib ripgrep-msg () + "Jumps to line associated with a ripgrep (rg) line numbered msg. +Ripgrep outputs each pathname once followed by all matching lines in that pathname. +Messages are recognized in any buffer (other than a helm completion +buffer)." + ;; Locate and parse ripgrep messages found in any buffer other than a + ;; helm completion buffer. + ;; + ;; Sample ripgrep command output: + ;; + ;; bash-3.2$ rg -nA2 hkey-throw *.el + ;; hmouse-drv.el + ;; 405:(defun hkey-throw (release-window) + ;; 406- "Throw either a displayable item at point or the current buffer to RELEASE-WINDOW. + ;; 407-The selected window does not change." + ;; -- + ;; 428: (hkey-throw to-window))) + ;; 429- + ;; 430-(defun hmouse-click-to-drag () + ;; + ;; Use `rg -n --no-heading' for pathname on each line. + (unless (eq major-mode 'helm-major-mode) + (save-excursion + (beginning-of-line) + (when (looking-at "\\([1-9][0-9]*\\)[-:]") + ;; Ripgrep matches and context lines (-A option) + (let ((line-num (match-string-no-properties 1))) + (while (and (= (forward-line -1) 0) + (looking-at "[1-9][0-9]*[-:]\\|--$"))) + (unless (looking-at "[1-9][0-9]*[-:]\\|--$") + (let* ((file (buffer-substring-no-properties (point-at-bol) (point-at-eol))) + (but-label (concat file ":" line-num)) + (source-loc (if (file-name-absolute-p file) nil + (hbut:key-src t)))) + (if (stringp source-loc) + (setq file (expand-file-name file (file-name-directory source-loc)))) + (when (file-readable-p file) + (setq line-num (string-to-number line-num)) + (ibut:label-set but-label) + (hact 'link-to-file-line file line-num))))))))) + (defib grep-msg () - "Jumps to line associated with grep or compilation error msgs. -Messages are recognized in any buffer." + "Jumps to line associated with line numbered grep or compilation error msgs. +Messages are recognized in any buffer (other than a helm completion +buffer) except for grep -A context lines which are matched only +in grep and shell buffers." ;; Locate and parse grep messages found in any buffer other than a ;; helm completion buffer. (unless (eq major-mode 'helm-major-mode) @@ -650,8 +724,7 @@ Messages are recognized in any buffer." (source-loc (if (file-name-absolute-p file) nil (hbut:key-src t)))) (if (stringp source-loc) - (setq file (expand-file-name - file (file-name-directory source-loc)))) + (setq file (expand-file-name file (file-name-directory source-loc)))) (setq line-num (string-to-number line-num)) (ibut:label-set but-label) (hact 'link-to-file-line file line-num)))))) diff --git a/hload-path.el b/hload-path.el index 8650d41..d827ce8 100644 --- a/hload-path.el +++ b/hload-path.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 29-Jun-16 at 14:39:33 ;; -;; Copyright (C) 1992-2016 Free Software Foundation, Inc. +;; Copyright (C) 1992-2017 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -20,22 +20,8 @@ ;;; ;;;###autoload (defconst hyperb:emacs-p - (and (not (featurep 'xemacs)) - ;; Version 19 and above, the only ones supported. - (string-lessp "19" emacs-version) - emacs-version) - "Version string under GNU Emacs 19 or higher, or nil") - -;;; Koutlines work only with specific versions of Emacs and XEmacs. -;;;###autoload -(defconst hyperb:kotl-p - (if (featurep 'xemacs) - ;; Only works for XEmacs 19.9 and above. - (or (string-match "^19\\.9 \\|^19\\.[1-9][0-9]" emacs-version) - ;; Version 20 and above. - (string-lessp "20" emacs-version)) - hyperb:emacs-p) - "Non-nil iff this Emacs version supports the Hyperbole Koutliner.") + (and (not (featurep 'xemacs)) emacs-version) + "Version string if running under GNU Emacs, else nil") ;;; ************************************************************************ ;;; Hyperbole Directory Setting (dynamically computed) @@ -66,15 +52,13 @@ It must end with a directory separator character.") ;;; Koutliner mode and file suffix importation settings ;;; ************************************************************************ -;; If the Koutliner is supported by this emacs version, perform -;; initializations. +;; Perform Koutliner initializations. -(if hyperb:kotl-p - (progn (add-to-list 'load-path (expand-file-name "kotl/" hyperb:dir)) - ;; Invoke kotl-mode for files ending in ".kotl". Also - ;; allow ".kot" for DOS and Windows users. - (setq auto-mode-alist (cons '("\\.kotl$\\|\\.kot$" . kotl-mode) - auto-mode-alist)))) +(add-to-list 'load-path (expand-file-name "kotl/" hyperb:dir)) +;; Invoke kotl-mode for files ending in ".kotl". +;; Also allow ".kot" for DOS and Windows users. +(setq auto-mode-alist (cons '("\\.kotl$\\|\\.kot$" . kotl-mode) + auto-mode-alist)) (provide 'hload-path) diff --git a/hlvar.el b/hlvar.el deleted file mode 100644 index a6d2eed..0000000 --- a/hlvar.el +++ /dev/null @@ -1,138 +0,0 @@ -;;; hlvar.el --- GNU Hyperbole variables in local variable lists -;; -;; Author: Bob Weiner -;; -;; Orig-Date: 4-Nov-91 at 00:26:06 -;; -;; Copyright (C) 1995-2016 Free Software Foundation, Inc. -;; See the "HY-COPY" file for license information. -;; -;; This file is part of GNU Hyperbole. -;; This file is a slight variant of that found in "files.el" from GNU Emacs. -;; -;;; Commentary: -;; -;; Hyperbole uses the colon character extensively in its variable names. -;; The standard GNU Emacs syntax for local variable setting does not allow -;; the use of this character, even though it is a valid symbol name -;; character. The code here is slightly modified to support local setting of -;; variables with colons in their names. -;; -;; Where the standard code allows: var:val -; This code requires one use: var: val (where var may include colons) -;; -;; So functionality is gained and none is lost, but a slight incompatibility -;; in protocol is introduced. - -;;; Code: -;;; ************************************************************************ -;;; Public functions -;;; ************************************************************************ - -(defun hack-local-variables (&optional force) - "Parse, and bind or evaluate as appropriate, any local variables -for current buffer." - (if (fboundp 'hack-local-variables-prop-line) - (hack-local-variables-prop-line)) - ;; Look for "Local variables:" line in last page. - (save-excursion - (goto-char (point-max)) - (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) - (let (local-start) - (if (let ((case-fold-search t) - (ignore nil)) - (and (search-forward "Local Variables:" nil t) - (setq local-start (match-beginning 0)) - (or (and (not (string-match "^19\\." emacs-version)) - (not (inhibit-local-variables-p))) - force - (if (string-match "^19\\." emacs-version) - (cond ((eq enable-local-variables t) t) - ((eq enable-local-variables nil) - (setq ignore t)))) - (if ignore - nil - (save-window-excursion - (switch-to-buffer (current-buffer)) - (save-excursion - (beginning-of-line) - (set-window-start (selected-window) (point))) - (y-or-n-p - (format "Set local variables as specified at end of %s? " - (file-name-nondirectory - buffer-file-name)))))))) - (let ((continue t) - prefix prefixlen suffix beg - (enable-local-eval - (if (boundp 'enable-local-eval) enable-local-eval))) - ;; The prefix is what comes before "local variables:" in its line. - ;; The suffix is what comes after "local variables:" in its line. - (skip-chars-forward " \t") - (or (eolp) - (setq suffix (buffer-substring (point) - (progn (end-of-line) (point))))) - (goto-char local-start) - (or (bolp) - (setq prefix - (buffer-substring (point) - (progn (beginning-of-line) (point))))) - - (if prefix (setq prefixlen (length prefix) - prefix (regexp-quote prefix))) - (if suffix (setq suffix (concat (regexp-quote suffix) "$"))) - (while continue - ;; Look at next local variable spec. - (if selective-display (re-search-forward "[\n\r]") - (forward-line 1)) - ;; Skip the prefix, if any. - (if prefix - (if (looking-at prefix) - (forward-char prefixlen) - (error "Local variables entry is missing the prefix"))) - ;; Find the variable name; strip whitespace. - (skip-chars-forward " \t") - (setq beg (point)) - ;; - ;; Bob Weiner - changed here to allow colons in var names. - ;; - (skip-chars-forward "^ \t\n\r") - (skip-chars-backward ":") - (or (looking-at "[ \t]*:") - (error "(hack-local-variables): Missing colon in local variables entry")) - ;; - ;; Bob Weiner - end changes. - ;; - (let* ((str (buffer-substring beg (point))) - (var (read str)) - val) - ;; Setting variable named "end" means end of list. - (if (string-equal (downcase str) "end") - (setq continue nil) - ;; Otherwise read the variable value. - (skip-chars-forward "^:") - (forward-char 1) - (setq val (read (current-buffer))) - (skip-chars-backward "\n\r") - (skip-chars-forward " \t") - (or (if suffix (looking-at suffix) (eolp)) - (error "Local variables entry is terminated incorrectly")) - ;; Set the variable. "Variables" mode and eval are funny. - (if (fboundp 'hack-one-local-variable) - (hack-one-local-variable var val) - (cond ((eq var 'mode) - (funcall (intern (concat (downcase (symbol-name val)) - "-mode")))) - ((eq var 'eval) - (if (string-equal (user-login-name) "root") - (message - "Ignoring `eval:' in file's local variables") - (eval val))) - (t (make-local-variable var) - (set var val)))))))))) - (run-hooks 'hack-local-variables-hook))) - - - -(provide 'hlvar) - -;;; hlvar.el ends here diff --git a/hmouse-drv.el b/hmouse-drv.el index 842044d..792f145 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -16,10 +16,18 @@ ;;; Other required Elisp libraries ;;; ************************************************************************ -(eval-when-compile - (defvar hmouse-alist nil) - (require 'hui-window) - (makunbound 'hmouse-alist)) ;; for `hmouse-drag-item-to-display' +;; Keep this here at the top to prevent recursive reloads from +;; Hyperbole autoload commands. +(provide 'hmouse-drv) + +(if (and (boundp 'hmouse-alist) hmouse-alist) + (require 'hui-window) + ;; Force re-definition of hmouse-alist. + (makunbound 'hmouse-alist) + ;; Define hmouse-alist. + (load "hui-mouse") + ;; Add drag actions to hmouse-alist. + (load "hui-window")) (require 'hypb) ;; Quiet byte compiler warnings for these free variables. @@ -194,7 +202,7 @@ EVENT will be passed to 'hmouse-function'." (apply #'assist-mouse-key (hmouse-key-release-args-emacs event))) (defun action-mouse-key (&rest args) - "Set point to the current mouse cursor position and execute `action-key'. + "Set point to the current mouse or keyboard cursor position and execute `action-key'. Any ARGS will be passed to `hmouse-function'." (interactive) ;; Make this a no-op if some local mouse key binding overrode the global @@ -218,7 +226,7 @@ Any ARGS will be passed to `hmouse-function'." hkey-value nil)))) (defun assist-mouse-key (&rest args) - "Set point to the current mouse cursor position and execute `assist-key'. + "Set point to the current mouse or keyboard cursor position and execute `assist-key'. Any ARGS will be passed to `hmouse-function'." (interactive) ;; Make this a no-op if some local mouse key binding overrode the global @@ -313,113 +321,344 @@ bound to a valid function." (unless (listp arg) (setq arg nil))) (if arg (assist-key) (action-key))) + ;;; ************************************************************************ -;;; Public support functions +;;; Hyperbole ace-window selection functions +;;; https://github.com/abo-abo/ace-window ;;; ************************************************************************ -(defun hkey-debug () - (message (format "(HyDebug) %sContext: %s; %s: %s; Buf: %s; Mode: %s; MinibufDepth: %s" - (cond ((eq pred-value 'hbut:current) - (format "ButType: %s; ButLabel: %s; " - (hattr:get 'hbut:current 'categ) - (hypb:format-quote (hbut:label 'hbut:current)))) - ((functionp pred-value) - (format "Selection Func: %s; " pred-value)) - (t "")) - pred - (if assist-flag "Assist" "Action") - (hypb:format-quote (format "%s" hkey-action)) - (current-buffer) major-mode (minibuffer-depth)))) +;; A call to (hkey-ace-window-setup) or (require 'ace-window) must be +;; made prior to calling any other function in this section since +;; Hyperbole does not require ace-window itself. + +;;;###autoload +(defun hkey-ace-window-setup (&optional key) + "Bind optional keyboard KEY and setup display of items in windows specified by short ids. + +The ace-window package, (see \"https://elpa.gnu.org/packages/ace-window.html\"), +assigns short ids to each Emacs window and lets you jump to or +operate upon a specific window by giving its letter. Hyperbole +can insert an operation into ace-window that allows you to +display items such as dired or buffer menu items in a specific +window. + +To enable this feature, in your Emacs initialization file after +Hyperbole is initialized, if you already have a key bound for +ace-window, then call: + + (hkey-ace-window-setup) + +otherwise, choose a binding like {M-o} and send it to the same +function to bind it: + + (hkey-ace-window-setup \"\M-o\") + +Then whenever point is on an item you want displayed in another +window, use {M-o i } and watch the +magic happen." + (require 'ace-window) + (when key (global-set-key key 'ace-window)) + ;; New ace-window frames (window id = z) inherit the size of the + ;; prior selected frame; same as HyWindow. + (setq aw-frame-size '(0 . 0) + aw-dispatch-alist (delq (assq ?t aw-dispatch-alist) + (delq (assq ?r aw-dispatch-alist) + (delq (assq ?i aw-dispatch-alist) aw-dispatch-alist)))) + (push '(?i hkey-drag-to "Hyperbole: Drag To") aw-dispatch-alist) + ;; Ace-window includes ?m as the swap windows key, so it is not added here. + (push '(?r hkey-replace "Hyperbole: Replace Here") aw-dispatch-alist) + (push '(?t hkey-throw "Hyperbole: Throw To") aw-dispatch-alist) + (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) + ;; allows {i} operation to work when only 2 windows exist + aw-dispatch-always t) + (ace-window-display-mode 1)) ;;;###autoload (defun hkey-drag (release-window) - "Emulate Smart Mouse Key drag from selected window to RELEASE-WINDOW. + "Emulate Smart Mouse Key drag from selected window to RELEASE-WINDOW, interactively chosen via ace-window. The drag action determines the final selected window. Optional prefix ARG non-nil means emulate Assist Key rather than the Action Key. -Only works when running under a window system, not from a dumb terminal." +Works only when running under a window system, not from a dumb terminal." ;; Cancel any partial drag that may have been recorded. - (if current-prefix-arg - (setq assist-key-depressed-flag nil) - (setq action-key-depressed-flag nil)) - (hkey-operate current-prefix-arg) - (when (window-live-p release-window) - (select-window release-window)) - (hkey-operate current-prefix-arg)) + (interactive (list (aw-select " Ace - Hyperbole: Drag"))) + (condition-case nil + ;; This may trigger a No Action error if start-window and + ;; release-window are the same; in that case, use the error + ;; handler to handle dragging an item. + (progn (if current-prefix-arg + (setq assist-key-depressed-flag nil) + (setq action-key-depressed-flag nil)) + (hkey-operate current-prefix-arg) + (when (window-live-p release-window) + (hypb:select-window-frame release-window)) + (hkey-operate current-prefix-arg)) + (error (when (eq start-window release-window) + (hmouse-drag-item-to-display))))) + +;;;###autoload +(defun hkey-drag-stay (release-window) + "Emulate Smart Mouse Key drag from selected window to RELEASE-WINDOW, interactively chosen via ace-window. +After the drag, the selected window remains the same as it was before +the drag. + +Optional prefix ARG non-nil means emulate Assist Key rather than the +Action Key. + +Works only when running under a window system, not from a dumb terminal." + (let ((start-window (selected-window))) + (unwind-protect + (hkey-drag release-window) + ;; Leave start-window selected + (when (window-live-p start-window) + (hypb:select-window-frame start-window))))) ;;;###autoload (defun hkey-drag-to (release-window) - "Emulate Smart Mouse Key drag from selected window to RELEASE-WINDOW. + "Emulate Smart Mouse Key drag from selected window to RELEASE-WINDOW, interactively chosen via ace-window. If an item is dragged to RELEASE-WINDOW, then RELEASE-WINDOW is selected; otherwise, the drag action determines the selected window. Optional prefix ARG non-nil means emulate Assist Key rather than the Action Key. -Only works when running under a window system, not from a dumb terminal." - (if (and (hmouse-drag-item-to-display) (window-live-p release-window)) +Works only when running under a window system, not from a dumb terminal." + (interactive + (list (let ((mode-line-text (concat " Ace - " (nth 2 (assq ?i aw-dispatch-alist))))) + (aw-select mode-line-text)))) + (if (and (hmouse-at-item-p) (window-live-p release-window)) (progn (hkey-drag release-window) - ;; Leave release window selected + ;; Leave release-window selected (when (window-live-p release-window) - (select-window release-window))) + (hypb:select-window-frame release-window))) ;; Leave hkey-drag to choose selected window (hkey-drag release-window))) ;;;###autoload +(defun hkey-replace (release-window) + "Grab the buffer from RELEASE-WINDOW, interactively chosen via ace-window, and place it into the current window. +The selected window does not change." + (interactive + (list (let ((mode-line-text (concat " Ace - " (nth 2 (assq ?r aw-dispatch-alist))))) + (aw-select mode-line-text)))) + (set-window-buffer (selected-window) (window-buffer release-window))) + +;;;###autoload +(defun hkey-swap (to-window) + "Swap the buffer from the selected window with that of TO-WINDOW, interactively chosen via ace-window. +Leave TO-WINDOW as the selected window." + (interactive + (list (let ((mode-line-text (concat " Ace - Hyperbole: " (nth 2 (assq ?m aw-dispatch-alist))))) + (aw-select mode-line-text)))) + (hkey-swap-buffers (selected-window) to-window)) + +;;;###autoload (defun hkey-throw (release-window) - "Emulate Smart Mouse Key drag from selected window to RELEASE-WINDOW. -After the drag, the selected window remains the same as it was before -the drag. + "Throw either a displayable item at point or the current buffer to RELEASE-WINDOW. +The selected window does not change." + (interactive + (list (let ((mode-line-text (concat " Ace - " (nth 2 (assq ?t aw-dispatch-alist))))) + (aw-select mode-line-text)))) + (let ((depress-frame (selected-frame))) + (if (cadr (assq major-mode hmouse-drag-item-mode-forms)) + ;; On an item to throw + (let ((action-key-depress-window (selected-window)) + (action-key-release-window release-window) + (action-key-depress-args)) + (hypb:save-selected-window-and-input-focus + (hmouse-item-to-window) + (unless (eq depress-frame (window-frame release-window)) + (message "Buffer or item thrown to frame under this one") + ;; Show the frame thrown to before it is covered when + ;; input-focus is returned to the depress-frame. + ;; (raise-frame (window-frame release-window)) + ;; (sit-for 1) + ))) + ;; Throw the current buffer + (set-window-buffer release-window (current-buffer)) + (unless (eq depress-frame (window-frame release-window)) + (message "Buffer or item thrown to frame under this one") + ;; Show the frame thrown to before it is covered when + ;; input-focus is returned to the depress-frame. + ;; (raise-frame (window-frame release-window)) + ;; (sit-for 1) + ;; (select-frame-set-input-focus depress-frame) + )))) -Optional prefix ARG non-nil means emulate Assist Key rather than the -Action Key. +;;;###autoload +(defun hkey-buffer-to (from-window to-window) + "Use ace-window to choose a FROM-WINDOW whose buffer will also be displayed in the chosen TO-WINDOW. +The selected window does not change." + (interactive + (list (aw-select " Ace - Hyperbole: Buffer to Show") + (aw-select " Ace - Hyperbole: Show in Window"))) + (with-selected-window from-window + (set-window-buffer to-window (current-buffer)))) -Only works when running under a window system, not from a dumb terminal." - (let ((start-win (selected-window))) - (condition-case nil - ;; This may trigger a No Action error if start-win and - ;; release-win are the same. - (hkey-drag release-window) - (error (when (eq start-win release-window) - (hmouse-drag-item-to-display)))) - (when (window-live-p start-win) (select-window start-win)))) +;;;###autoload +(defun hkey-swap-buffers (from-window to-window) + "Use ace-window to choose a FROM-WINDOW whose buffer is swapped with the buffer of the chosen TO-WINDOW. +Leave TO-WINDOW as the selected window." + (interactive + (list (aw-select " Ace - Hyperbole: Swap from Buffer1...") + (aw-select " Ace - Hyperbole: ...to Buffer2"))) + (let ((from-buf (window-buffer from-window)) + (to-buf (window-buffer to-window))) + (set-window-buffer from-window to-buf) + (set-window-buffer to-window from-buf) + (hypb:select-window-frame to-window))) -(defun hkey-ace-window-setup (&optional key) - "Bind optional keyboard KEY and setup display of items in windows specified by short ids. +;;; ************************************************************************ +;;; Hyperbole mouse click window selection functions +;;; ************************************************************************ -The ace-window package, (see \"https://elpa.gnu.org/packages/ace-window.html\"), -assigns short ids to each Emacs window and lets you jump to or -operate upon a specific window by giving its letter. Hyperbole -can insert an operation into ace-window that allows you to -display items such as dired or buffer menu items in a specific -window. +;;;###autoload +(defun hmouse-click-to-drag () + "Mouse click on start and end windows for use with `hkey-drag'. +Emulate Smart Mouse Key drag from start window to end window. +The drag action determines the final selected window." + (interactive) + (hmouse-choose-windows #'hkey-drag)) -To enable this feature, in your Emacs initialization file after -Hyperbole is initialized, if you already have a key bound for -ace-window, then call: +;;;###autoload +(defun hmouse-click-to-drag-stay () + "Mouse click on start and end windows for use with `hkey-drag-stay'. +Emulate Smart Mouse Key drag from start window to end window. +The selected window does not change." + (interactive) + (hmouse-choose-windows #'hkey-drag-stay)) - (hkey-ace-window-setup) +;;;###autoload +(defun hmouse-click-to-drag-to () + "Mouse click on start and end windows for use with `hkey-drag-to'. +Emulate Smart Mouse Key drag from start window to end window. +After the drag, the end window is the selected window." + (interactive) + (hmouse-choose-windows #'hkey-drag-to)) -otherwise, choose a binding like {M-o} and send it to the same -function to bind it: +;;;###autoload +(defun hmouse-click-to-replace () + "Mouse click on start and end windows for use with `hkey-replace'. +Replace the buffer in start window with the buffer in end window. +The selected window does not change." + (interactive) + (hmouse-choose-windows #'hkey-replace)) - (hkey-ace-window-setup \"\M-o\") +;; Test this next command +;; (global-set-key [C-down-mouse-1] nil) +;; (global-set-key [C-mouse-1] 'hmouse-click-to-swap) +;;;###autoload +(defun hmouse-click-to-swap () + "Mouse click on start and end windows for use with `hkey-swap'. +Swap the buffer in start window with the buffer in end window. +Leave the end window selected." + (interactive) + (hmouse-choose-windows #'hkey-swap)) -Then whenever point is on an item you want displayed in another -window, use {M-o i } and watch the -magic happen." - (require 'ace-window) - (when key (global-set-key key 'ace-window)) - (setq aw-dispatch-alist (delq (assq ?t aw-dispatch-alist) - (delq (assq ?i aw-dispatch-alist) aw-dispatch-alist))) - (push '(?i hkey-drag-to "Hyperbole Drag To") aw-dispatch-alist) - (push '(?t hkey-throw "Hyperbole Throw") aw-dispatch-alist) - (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) - ;; allows {i} operation to work when only 2 windows exist - aw-dispatch-always t) - (ace-window-display-mode 1)) +;;;###autoload +(defun hmouse-click-to-throw () + "Mouse click on start and end windows for use with `hkey-throw'. +Throw either a displayable item at start window's point or its current +buffer to the end window. The selected window does not change." + (interactive) + (hmouse-choose-windows #'hkey-throw)) + +(defun hmouse-choose-windows (func) + "Mouse click on start and end windows for FUNC. +Then with the start window temporarily selected, run FUNC with the +end window as an argument. + +Appropriate FUNCs include: hkey-drag, hkey-drag-to, hkey-replace, +hkey-swap and hkey-throw." + (let* (start-event + end-event + start-window + end-window) + (message "Click on the %s start window..." func) + (setq start-window + (cl-loop do (setq start-event (read-event)) + until (and (mouse-event-p start-event) + (not (string-match "\\`down-" (symbol-name (car start-event))))) + finally return (posn-window (event-start start-event)))) + (message "Click on the %s start window...Now on the end window..." func) + (setq end-window + (cl-loop do (setq end-event (read-event)) + until (and (mouse-event-p end-event) + (not (string-match "\\`down-" (symbol-name (car end-event))))) + finally return (posn-window (event-start end-event)))) + (message "Click on the %s start window...Now on the end window...Done" func) + (with-selected-window start-window + (funcall func end-window)))) + +;;; ************************************************************************ +;;; Hyperbole Directional Buffer Movement Commands +;;; ************************************************************************ + +;;;###autoload +(defun hkey-buffer-move-left () + "Swap the current buffer with the one on its left, if any; otherwise, do nothing." + (interactive) + (hkey-buffer-move 'left)) + +;;;###autoload +(defun hkey-buffer-move-right () + "Swap the current buffer with the one on its right, if any; otherwise, do nothing." + (interactive) + (hkey-buffer-move 'right)) + +;;;###autoload +(defun hkey-buffer-move-down () + "Swap the current buffer with the one below it, if any; otherwise, do nothing." + (interactive) + (hkey-buffer-move 'down)) + +;;;###autoload +(defun hkey-buffer-move-up () + "Swap the current buffer with the one on above it, if any; otherwise, do nothing." + (interactive) + (hkey-buffer-move 'up)) + +(defun hkey-buffer-move (direction &optional arg) + "Move the current buffer to the next window in DIRECTION, a symbol, one of: up, down, left or right. + +When the window-jump package is available and `wj-jump-frames' is +non-nil, the buffer may be moved across non-overlapping frames in +the given direction." + (interactive "SDirection to move buffer (up, down, left or right): \nP") + ;; Prefer the window-jump package ... + (if (require 'window-jump nil t) + (let ((w1 (selected-window))) + (window-jump + (pcase direction + ('left wj-vec-left) + ('right wj-vec-right) + ('down wj-vec-down) + ('up wj-vec-up) + (_ (error "(hkey-buffer-move): Invalid movement direction, '%s'" direction)))) + (hkey-swap-buffers w1 (selected-window))) + ;; ... but if not available, use the Emacs builtin windmove package. + (require 'windmove) + (windmove-do-window-select direction arg))) + +;;; ************************************************************************ +;;; Public support functions +;;; ************************************************************************ + +(defun hkey-debug () + (message (format "(HyDebug) %sContext: %s; %s: %s; Buf: %s; Mode: %s; MinibufDepth: %s" + (cond ((eq pred-value 'hbut:current) + (format "ButType: %s; ButLabel: %s; " + (hattr:get 'hbut:current 'categ) + (hypb:format-quote (hbut:label 'hbut:current)))) + ((functionp pred-value) + (format "Selection Func: %s; " pred-value)) + (t "")) + pred + (if assist-flag "Assist" "Action") + (hypb:format-quote (format "%s" hkey-action)) + (current-buffer) major-mode (minibuffer-depth)))) (defun hkey-execute (assist-flag) "Evaluate Action Key form (or Assist Key form with ASSIST-FLAG non-nil) for first non-nil predicate from `hkey-alist'. @@ -570,41 +809,46 @@ the current window. By default, it is displayed according to the setting of `hpath:display-where'." (if (bufferp buffer) (setq buffer (buffer-name buffer))) (if (null buffer) (setq buffer (buffer-name (current-buffer)))) - (and (stringp buffer) - (string-match "^\\*Help\\|Help\\*$" buffer) - (not (memq t (mapcar (lambda (wind) - (string-match - "^\\*Help\\|Help\\*$" - (buffer-name (window-buffer wind)))) - (hypb:window-list 'no-mini)))) - (setq hkey--wconfig (current-window-configuration))) - (unwind-protect - (let* ((buf (get-buffer-create buffer)) - ;; Help-mode calls with-temp-buffer which invokes one of these hooks - ;; which calls hkey-help-show again, so nullify them before - ;; displaying the buffer. - (temp-buffer-show-hook) - (temp-buffer-show-function) - (wind (cond (current-window - (switch-to-buffer buf) - (selected-window)) - (t (hpath:display-buffer buf))))) - (when wind - (setq minibuffer-scroll-window wind) - ;; Don't use help-mode in buffers already set up with a - ;; quit-key to bury the buffer, e.g. minibuffer completions, - ;; as this will sometimes disable default left mouse key item - ;; selection. - (unless (or (where-is-internal 'quit-window (current-local-map)) - (where-is-internal 'hkey-help-hide (current-local-map))) - (when (string-match "^\\*Help\\|Help\\*$" (buffer-name)) - (help-mode)) - (when (derived-mode-p 'help-mode) - (local-set-key "q" #'hkey-help-hide))))) - ;; If in a *Completions* buffer, re-select the window that - ;; generated the completions. - (if (buffer-live-p completion-reference-buffer) - (select-window (get-buffer-window completion-reference-buffer t))))) + (let ((org-help (and (stringp buffer) (string-match "\\`\\*Org Help\\*" buffer))) + (owind (selected-window))) + (and (stringp buffer) + (string-match "^\\*Help\\|Help\\*$" buffer) + (not (memq t (mapcar (lambda (wind) + (string-match + "^\\*Help\\|Help\\*$" + (buffer-name (window-buffer wind)))) + (hypb:window-list 'no-mini)))) + (setq hkey--wconfig (current-window-configuration))) + (unwind-protect + (let* ((buf (get-buffer-create buffer)) + ;; Help-mode calls with-temp-buffer which invokes one of these hooks + ;; which calls hkey-help-show again, so nullify them before + ;; displaying the buffer. + (temp-buffer-show-hook) + (temp-buffer-show-function) + (wind (cond (current-window + (switch-to-buffer buf) + (selected-window)) + (t (hpath:display-buffer buf))))) + ;; Ignore org-mode's temp help buffers which it handles on its own. + (when (and wind (not org-help)) + (setq minibuffer-scroll-window wind) + ;; Don't use help-mode in buffers already set up with a + ;; quit-key to bury the buffer, e.g. minibuffer completions, + ;; as this will sometimes disable default left mouse key item + ;; selection. + (unless (or (where-is-internal 'quit-window (current-local-map)) + (where-is-internal 'hkey-help-hide (current-local-map))) + (when (string-match "^\\*Help\\|Help\\*$" (buffer-name)) + (help-mode)) + (when (derived-mode-p 'help-mode) + (local-set-key "q" #'hkey-help-hide))))) + ;; If in an *Org Help* buffer, reselect the Org buffer. + (if org-help (select-window owind)) + ;; If in a *Completions* buffer, re-select the window that + ;; generated the completions. + (if (buffer-live-p completion-reference-buffer) + (select-window (get-buffer-window completion-reference-buffer t)))))) (defun hkey-mouse-help (assist-flag args) "If a Smart Key help flag is set and the other Smart Key is not down, show help. @@ -626,7 +870,7 @@ Return t if help is displayed, nil otherwise." (hmouse-function #'hkey-assist-help assist-flag args) t))) (when help-shown - ;; Then both Smart Keys have been released. + ;; Then both Smart Keys have been released. (setq action-key-cancelled nil assist-key-cancelled nil) t)))) @@ -1065,6 +1309,4 @@ not." (or rtn (progn (beep) (message "End of buffer"))) rtn)) -(provide 'hmouse-drv) - ;;; hmouse-drv.el ends here diff --git a/hmouse-sh.el b/hmouse-sh.el index 64fceee..ac5c609 100644 --- a/hmouse-sh.el +++ b/hmouse-sh.el @@ -508,7 +508,12 @@ point determined by `mouse-select-region-move-to-beginning'." (hmouse-bind-shifted-key-emacs 2 #'assist-key-depress-emacs #'assist-mouse-key-emacs)) ;; X, macOS or MS Windows (hmouse-bind-shifted-key-emacs 2 #'action-key-depress-emacs #'action-mouse-key-emacs) - (hmouse-bind-shifted-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs))) + (hmouse-bind-shifted-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs) + (with-eval-after-load "company" + (define-key company-active-map [S-down-mouse-2] 'ignore) + (define-key company-active-map [S-mouse-2] 'smart-company-to-definition) + (define-key company-active-map [S-down-mouse-3] 'ignore) + (define-key company-active-map [S-mouse-3] 'smart-company-help)))) ;; ;; XEmacs ((featurep 'xemacs) @@ -585,7 +590,13 @@ With optional MIDDLE-KEY-ONLY-FLAG non-nil, binds only the middle mouse key." ;; X, macOS or MS Windows (hmouse-bind-key-emacs 2 #'action-key-depress-emacs #'action-mouse-key-emacs) (unless middle-key-only-flag - (hmouse-bind-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs)))) + (hmouse-bind-key-emacs 3 #'assist-key-depress-emacs #'assist-mouse-key-emacs)) + `(with-eval-after-load "company" + (define-key company-active-map [down-mouse-2] 'ignore) + (define-key company-active-map [mouse-2] 'smart-company-to-definition) + (unless ,middle-key-only-flag + (define-key company-active-map [down-mouse-3] 'ignore) + (define-key company-active-map [mouse-3] 'smart-company-help))))) ;; ;; XEmacs ((featurep 'xemacs) diff --git a/hmouse-tag.el b/hmouse-tag.el index 5ab5e57..e37f5e3 100644 --- a/hmouse-tag.el +++ b/hmouse-tag.el @@ -665,7 +665,7 @@ Returns nil when point is on the first line of a non-alias Lisp definition." (defun smart-lisp-mode-p () "Return t if in a mode which uses Lisp symbols." (or (smart-emacs-lisp-mode-p) - (memq major-mode '(lisp-mode scheme-mode)))) + (memq major-mode '(lisp-mode scheme-mode change-log-mode)))) ;;;###autoload (defun smart-objc (&optional identifier next) @@ -762,6 +762,24 @@ If key is pressed: (buffer-substring-no-properties (match-beginning 2) (match-end 2)) (match-beginning 2) (match-end 2))))))) + +(defun smart-python-jedi-to-definition-p () + "If the Jedi Python identifier server is running, test and use it to jump to the definition. +See https://tkf.github.io/emacs-jedi/latest/." + ;; Use functions from jedi-core.el only, not from jedi.el, since + ;; company-jedi.el users will have loaded only jedi-core.el. + (when (featurep 'jedi-core) + (let* ((servers (jedi:-get-servers-in-use)) + (proc (epc:manager-server-process (car servers)))) + (and servers (processp proc) + (eq 'run (process-status (process-buffer proc))) + ;; The goto is performed asynchronously. + ;; It reports in the minibuffer when a definition is not found. + (progn (jedi:goto-definition t) + ;; For use as a predicate, always return t if the Jedi server + ;; is running so other lookup techniques are not tried. + t))))) + ;;;###autoload (defun smart-python (&optional identifier next) "Jumps to the definition of optional Python IDENTIFIER or the one at point. @@ -770,6 +788,9 @@ Optional second arg NEXT means jump to next matching Python tag. It assumes that its caller has already checked that the key was pressed in an appropriate buffer and has moved the cursor to the selected buffer. +See the documentation for `smart-python-jedi-to-definition-p' for the +behavior when the Jedi python identifier server is in use. + See the documentation for `smart-python-oo-browser' for the behavior of this function when the OO-Browser has been loaded. @@ -777,10 +798,11 @@ Otherwise, on a Python identifier, the identifier definition is displayed, assuming the identifier is found within an `etags' generated tag file in the current directory or any of its ancestor directories." (interactive) - (cond ((fboundp 'python-to-definition) + (cond ((smart-python-jedi-to-definition-p)) + ((fboundp 'python-to-definition) ;; Only fboundp if the OO-Browser has been loaded. (smart-python-oo-browser)) - (identifier + (t (smart-python-tag identifier next)))) ;;;###autoload diff --git a/hsettings.el b/hsettings.el index 4200046..a980698 100644 --- a/hsettings.el +++ b/hsettings.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 15-Apr-91 at 00:48:49 ;; -;; Copyright (C) 1991-2016 Free Software Foundation, Inc. +;; Copyright (C) 1991-2017 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -216,10 +216,8 @@ obtained search string." ((and (featurep 'xemacs) (not noninteractive)) (require 'hui-xe-but) ;; - ;; If running XEmacs 19.8 or below, don't highlight explicit buttons - ;; whenever a file is read in since this can cause a sporadic crash - ;; when find-files are done. - (if hyperb:kotl-p (add-hook 'find-file-hook #'hproperty:but-create t)) + ;; Highlight explicit buttons when files are read in. + (add-hook 'find-file-hook #'hproperty:but-create t) (defalias 'hui:but-flash 'hproperty:but-flash) ;; ;; Substitute for the nil argument below a valid X color name with @@ -249,16 +247,6 @@ obtained search string." (add-hook 'hibtypes-end-load-hook (lambda () (require 'hib-doc-id))) ;;; ************************************************************************ -;;; HYPERBOLE LOCAL VARIABLE SUPPORT -;;; ************************************************************************ - -;;; Uncomment this if you really need to be able to use Hyperbole variables -;;; (and others with colons in their names) within file local variable lists. -;;; See the source file for more details. -;;; -;; (require 'hlvar) - -;;; ************************************************************************ ;;; SITE-SPECIFIC ADDITIONS - Add your Hyperbole configuration additions here. ;;; ************************************************************************ diff --git a/hui-menu.el b/hui-menu.el index bf179b4..b1f9a46 100644 --- a/hui-menu.el +++ b/hui-menu.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 28-Oct-94 at 10:59:44 ;; -;; Copyright (C) 1994-2016 Free Software Foundation, Inc. +;; Copyright (C) 1994-2017 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -415,29 +415,28 @@ REBUILD-FLAG is non-nil, in which case the menu is rebuilt." ["Help" hui:hbut-help t] ["Types" (hui:htype-help 'ibtypes 'no-sort) t] ) - (if hyperb:kotl-p - '("Koutliner" - ["Manual" (id-info "(hyperbole)Koutliner") t] - ["Example" kotl-mode:example t] - "----" - ["Create-File" kfile:find t] - ["View-File" kfile:view t] - "----" - ["Collapse-Tree" (progn (kotl-mode:is-p) - (kotl-mode:hide-tree - (kcell-view:label))) - (eq major-mode 'kotl-mode)] - ["Create-Link" klink:create - (eq major-mode 'kotl-mode)] - ["Expand-All-Trees" kotl-mode:show-all - (eq major-mode 'kotl-mode)] - ["Expand-Tree" (progn (kotl-mode:is-p) - (kotl-mode:show-tree - (kcell-view:label))) - (eq major-mode 'kotl-mode)] - ["Show-Top-Level-Only" kotl-mode:hide-body - (eq major-mode 'kotl-mode)] - )) + '("Koutliner" + ["Manual" (id-info "(hyperbole)Koutliner") t] + ["Example" kotl-mode:example t] + "----" + ["Create-File" kfile:find t] + ["View-File" kfile:view t] + "----" + ["Collapse-Tree" (progn (kotl-mode:is-p) + (kotl-mode:hide-tree + (kcell-view:label))) + (eq major-mode 'kotl-mode)] + ["Create-Link" klink:create + (eq major-mode 'kotl-mode)] + ["Expand-All-Trees" kotl-mode:show-all + (eq major-mode 'kotl-mode)] + ["Expand-Tree" (progn (kotl-mode:is-p) + (kotl-mode:show-tree + (kcell-view:label))) + (eq major-mode 'kotl-mode)] + ["Show-Top-Level-Only" kotl-mode:hide-body + (eq major-mode 'kotl-mode)] + ) '("Mail-Lists" ["Manual" (id-info "(hyperbole)Suggestion or Bug Reporting") t] diff --git a/hui-mini.el b/hui-mini.el index fb6734e..4483ede 100644 --- a/hui-mini.el +++ b/hui-mini.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 15-Oct-91 at 20:13:17 ;; -;; Copyright (C) 1991-2016 Free Software Foundation, Inc. +;; Copyright (C) 1991-2017 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -429,9 +429,8 @@ constructs. If not given, the top-level Hyperbole menu is used." "Jumps back to location prior to last Hyperbole button follow.") '("Ibut/" (menu . ibut) "Implicit button and button type commands.") - (if hyperb:kotl-p - '("Kotl/" (menu . otl) - "Autonumbered outlining and hyperlink capabilities.")) + '("Kotl/" (menu . otl) + "Autonumbered outlining and hyperlink capabilities.") '("Msg/" (menu . msg) "Mail and News messaging capabilities.") '("Rolo/" (menu . hyrolo) @@ -634,37 +633,36 @@ constructs. If not given, the top-level Hyperbole menu is used." "Just send the message; subject and body are ignored.") "Unsubscribe from the Hyperbole bug reporting list.") )) - (if hyperb:kotl-p - '(otl - . (("Kotl>") - ("All" kotl-mode:show-all "Expand all collapsed cells.") - ("Blanks" kvspec:toggle-blank-lines - "Toggle blank lines between cells on or off.") - ("Create" kfile:find "Create or edit an outline file.") - ("Downto" kotl-mode:hide-sublevels - "Hide all cells in outline deeper than a particular level.") - ("Examp" kotl-mode:example - "Display a self-descriptive example outline file.") - ("Hide" (progn (kotl-mode:is-p) - (kotl-mode:hide-tree (kcell-view:label))) - "Collapse tree rooted at point.") - ("Info" - (id-info "(hyperbole)Koutliner") - "Display manual section on Hyperbole Koutliner.") - ("Kill" kotl-mode:kill-tree - "Kill ARG following trees starting from point.") - ("Link" klink:create - "Create and insert an implicit link at point.") - ("Overvw" kotl-mode:overview - "Show first line of each cell.") - ("Show" (progn (kotl-mode:is-p) - (kotl-mode:show-tree (kcell-view:label))) - "Expand tree rooted at point.") - ("Top" kotl-mode:top-cells - "Hide all but top-level cells.") - ("Vspec" kvspec:activate - "Prompt for and activate a view specifiction.") - ))) + '(otl + . (("Kotl>") + ("All" kotl-mode:show-all "Expand all collapsed cells.") + ("Blanks" kvspec:toggle-blank-lines + "Toggle blank lines between cells on or off.") + ("Create" kfile:find "Create or edit an outline file.") + ("Downto" kotl-mode:hide-sublevels + "Hide all cells in outline deeper than a particular level.") + ("Examp" kotl-mode:example + "Display a self-descriptive example outline file.") + ("Hide" (progn (kotl-mode:is-p) + (kotl-mode:hide-tree (kcell-view:label))) + "Collapse tree rooted at point.") + ("Info" + (id-info "(hyperbole)Koutliner") + "Display manual section on Hyperbole Koutliner.") + ("Kill" kotl-mode:kill-tree + "Kill ARG following trees starting from point.") + ("Link" klink:create + "Create and insert an implicit link at point.") + ("Overvw" kotl-mode:overview + "Show first line of each cell.") + ("Show" (progn (kotl-mode:is-p) + (kotl-mode:show-tree (kcell-view:label))) + "Expand tree rooted at point.") + ("Top" kotl-mode:top-cells + "Hide all but top-level cells.") + ("Vspec" kvspec:activate + "Prompt for and activate a view specifiction.") + )) '(hyrolo . (("Rolo>") ("Add" hyrolo-add "Add a new rolo entry.") diff --git a/hui-mouse.el b/hui-mouse.el index 000bbcc..c46b732 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -95,6 +95,12 @@ Its default value is #'smart-scroll-down." (defvar hkey-alist '( + ;; Company completion mode + ((and (boundp 'company-active-map) + (memq company-active-map (current-minor-mode-maps))) . + ((smart-company-to-definition) . (smart-company-help))) + ;; + ;; Treemacs hierarchical file manager ((eq major-mode 'treemacs-mode) . ((smart-treemacs) . (smart-treemacs))) ;; @@ -235,6 +241,13 @@ Its default value is #'smart-scroll-down." ((eq major-mode 'pages-directory-mode) . ((pages-directory-goto) . (pages-directory-goto))) ;; + ;; Python files - ensure this comes before Imenu for more advanced + ;; definition lookups + ((and (or (and (eq major-mode 'python-mode) buffer-file-name) + (string-match "^Pydoc:\\|\\*?Python" (buffer-name))) + (smart-python-at-tag-p)) . + ((smart-python) . (smart-python nil 'next-tag))) + ;; ;; Imenu listing in GNU Emacs ((smart-imenu-item-at-p) . ((smart-imenu-display-item-where (car hkey-value) (cdr hkey-value)) . @@ -275,11 +288,6 @@ Its default value is #'smart-scroll-down." (smart-javascript-at-tag-p)) . ((smart-javascript) . (smart-javascript nil 'next-tag))) ;; - ((and (or (and (eq major-mode 'python-mode) buffer-file-name) - (string-match "^Pydoc:\\|\\*?Python" (buffer-name))) - (smart-python-at-tag-p)) . - ((smart-python) . (smart-python nil 'next-tag))) - ;; ((and (eq major-mode 'objc-mode) buffer-file-name (smart-objc-at-tag-p)) . ((smart-objc) . (smart-objc nil 'next-tag))) @@ -384,9 +392,10 @@ evaluated. The `hkey-alist' variable is the subset of this alist used by the smart keyboard keys.") -;; This must be required after hmouse-alist is defined since this will -;; recursively require hmouse-drv which requires hui-window when being -;; compiled and that library requires that hmouse-alist be defined. +;; This must be required after hmouse-alist is defined in this file +;; since this will recursively require hmouse-drv which requires +;; hui-window when being compiled and that library requires that +;; hmouse-alist be defined. (require 'hmouse-key) ;; This next library adds drag actions to `hmouse-alist'. @@ -613,6 +622,30 @@ If assist-key is pressed: (scroll-calendar-left-three-months 1)) (t (mark-diary-entries)))) +;;; ************************************************************************ +;;; smart-company mode functions +;;; ************************************************************************ + +;; These functions are called from hkey-alist when keyboard Smart Keys +;; are used but for mouse keys, they are bound to local keys in +;; company-mode's minor mode map. + +(defun smart-company-to-definition (event) + "Action Key binding for company-mode completions popup to show item definition. +Use left mouse key or RET key to select a completion and exit." + (interactive "e") + (when (mouse-event-p last-command-event) + (company-select-mouse event)) + (company-show-location)) + +(defun smart-company-help (event) + "Assist Key binding for company-mode completions popup to show item doc." + (interactive "e") + (when (mouse-event-p last-command-event) + (company-select-mouse event)) + (if (featurep 'company-quickhelp) + (company-quickhelp-manual-begin) + (company-show-doc-buffer))) ;;; ************************************************************************ ;;; smart-dired functions diff --git a/hui-treemacs.el b/hui-treemacs.el index a33b7ce..db1aee6 100644 --- a/hui-treemacs.el +++ b/hui-treemacs.el @@ -18,6 +18,10 @@ (eval-and-compile (require 'treemacs nil t)) +(eval-when (load) + (unless (>= (string-to-number treemacs-version) 1.14) + (error "(hui-treemacs): Hyperbole requires Treemacs package version 1.14 or greater"))) + ;;; ************************************************************************ ;;; smart-treemacs functions ;;; ************************************************************************ @@ -35,9 +39,13 @@ If key is pressed: collapse the entry; (2) elsewhere within an entry line, the item is displayed for editing, normally in another window; - (3) on the first line of the buffer (other than the end of line), + (3) at the end of an entry line: invoke `action-key-eol-function', + typically to scroll up proportionally, if an Action Key press; invoke + `assist-key-eol-function', typically to scroll down proportionally, + if an Asisst Key press; + (4) on the first line of the buffer (other than the end of line), dired is run on the current directory of this Treemacs; - (4) at the end of the first or last line of the buffer, + (5) at the end of the first or last line of the buffer, this Treemacs invocation is quit." (interactive) @@ -47,8 +55,10 @@ If key is pressed: (hact 'link-to-directory default-directory))) ((and (last-line-p) (eolp)) (treemacs-toggle)) - (t (let ((over-icon (and (treemacs--current-button) - (= (point) (- (button-start (treemacs--current-button)) 2)))) + ((eolp) + (funcall (if assist-flag assist-key-eol-function action-key-eol-function))) + (t (let ((over-icon (and (treemacs-current-button) + (= (point) (- (button-start (treemacs-current-button)) 2)))) (result (treemacs-node-buffer-and-position))) (if (and (not over-icon) result (or (bufferp result) (listp result))) (if (listp result) @@ -73,16 +83,16 @@ Suitable for use as a value of `action-key-modeline-buffer-id-function'." (cond ;; Clicked on Treemacs buffer id ((if action-key-depress-window - (treemacs--is-treemacs-window? action-key-depress-window) + (treemacs-is-treemacs-window? action-key-depress-window) (string-match " Treemacs " (format-mode-line mode-line-format))) ;; Quit/hide treemacs. (treemacs-toggle)) ;; ;; Treemacs is visible and displaying the same dir as ;; the default dir of the clicked on modeline. - ((and (treemacs--buffer-exists?) + ((and (treemacs-buffer-exists?) (string-equal (expand-file-name default-directory) - (with-current-buffer (treemacs--buffer-exists?) + (with-current-buffer (treemacs-buffer-exists?) default-directory))) ;; Quit/hide treemacs. (treemacs-toggle)) @@ -91,131 +101,4 @@ Suitable for use as a value of `action-key-modeline-buffer-id-function'." (t (treemacs)))) (error "(smart-treemacs-modeline): Treemacs package is not installed"))) -;;; ************************************************************************ -;;; treemacs function updates -;;; ************************************************************************ - -;; Add this in treemacs-tags.el -(defun treemacs--imenu-tag-noselect (file tag-path) - "Return a list of the source buffer for FILE and the position of the tag from TAG-PATH." - (let ((tag (car tag-path)) - (path (cdr tag-path))) - (condition-case e - (progn - (find-file-noselect file) - (let ((index (treemacs--get-imenu-index file))) - (dolist (path-item path) - (setq index (cdr (assoc path-item index)))) - (-let [(buf pos) (treemacs--pos-from-marker - (cdr (--first - (equal (car it) tag) - index)))] - ;; some imenu implementations, like markdown, will only provide - ;; a raw buffer position (an int) to move to - (list (or buf (get-file-buffer file)) pos)))) - (error - (treemacs--log "Something went wrong when finding tag '%s': %s" - (propertize tag 'face 'treemacs-tags-face) - e))))) - -;; Add this in treemacs-tags.el -(defun treemacs--tag-noselect (btn) - "Return list of tag source buffer and position for BTN for future display." - (require 'hmouse-tag) ;; from GNU Hyperbole, adds xref convenience functions used herein - (-let [(tag-buf tag-pos) - (treemacs--with-button-buffer btn - (-> btn (button-get 'marker) (treemacs--pos-from-marker)))] - (if tag-buf - (list tag-buf tag-pos) - (-pcase treemacs-goto-tag-strategy - [`refetch-index - (let (file tag-path) - (with-current-buffer (marker-buffer btn) - (setq file (treemacs--nearest-path btn) - tag-path (treemacs--tags-path-of btn))) - (treemacs--imenu-tag-noselect file tag-path))] - [`call-xref - (let ((xref (xref-definition - (treemacs--with-button-buffer btn - (treemacs--get-label-of btn))))) - (when xref - (list (xref-item-buffer xref) (xref-item-position xref))))] - [`issue-warning - (treemacs--log "Tag '%s' is located in a buffer that does not exist." - (propertize (treemacs--with-button-buffer btn (treemacs--get-label-of btn)) 'face 'treemacs-tags-face))] - [_ (error "[Treemacs] '%s' is an invalid value for treemacs-goto-tag-strategy" treemacs-goto-tag-strategy)])))) - -;; Replace this macro in treemacs-impl.el -(cl-defmacro treemacs--execute-button-action - (&key save-window ensure-window-split split-function window dir-action file-action tag-action no-match-explanation) - "Infrastructure macro for setting up actions on different button states. -Fetches the currently selected button and verifies it's in the correct state -based on the given state actions. -If it isn't it will log NO-MATCH-EXPLANATION, if it is it selects WINDOW (or -`next-window' if none is given) and splits it with SPLIT-FUNCTION if given. -DIR-ACTION, FILE-ACTION, and TAG-ACTION are inserted into a `pcase' statement -matching the buttons state. -If ENSURE-WINDOW-SPLIT is t treemacs will vertically split the window if -treemacs is the only window to make sure a buffer is opened next to it, not -under or below it." - (let ((valid-states (list))) - (when dir-action - (push 'dir-node-open valid-states) - (push 'dir-node-closed valid-states)) - (when file-action - (push 'file-node-open valid-states) - (push 'file-node-closed valid-states)) - (when tag-action - (push 'tag-node valid-states)) - `(-when-let (btn (treemacs--current-button)) - (treemacs--without-following - (let* ((state (button-get btn 'state)) - (current-window (selected-window))) - (if (not (memq state ',valid-states)) - (treemacs--log "%s" ,no-match-explanation) - (progn - ,@(if ensure-window-split - `((when (one-window-p) - (save-selected-window - (split-window nil nil (if (eq 'left treemacs-position) 'right 'left)))))) - (select-window (or ,window (next-window (selected-window) nil nil))) - ,@(if split-function - `((funcall ,split-function) - (other-window 1))) - ;; Return the result of the action - (prog1 (pcase state - ,@(when dir-action - `(((or `dir-node-open `dir-node-closed) - ,dir-action))) - ,@(when file-action - `(((or `file-node-open `file-node-closed) - ,file-action))) - ,@(when tag-action - `((`tag-node - ,tag-action))) - (_ (error "No match achieved even though button's state %s was part of the set of valid states %s" - state ',valid-states))) - (when ,save-window - (select-window current-window)))))))))) - -;; Reload source form of this library so updated version of -;; `treemacs--execute-button-action' above is used throughout. -(load "treemacs-interface.el") - -;; Add to treemacs-interface.el. -;;;###autoload -(defun treemacs-node-buffer-and-position (&optional arg) - "Return source buffer or list of buffer and position for the current node for future display. -Stay in the selected window and ignore any prefix argument ARG." - (interactive "P") - (let ((treemacs--no-messages t)) - (treemacs--execute-button-action - :file-action (find-file-noselect (treemacs--safe-button-get btn 'abs-path)) - :dir-action (find-file-noselect (treemacs--safe-button-get btn 'abs-path)) - :tag-action (treemacs--tag-noselect btn) - :window (selected-window) - :save-window t - :ensure-window-split nil - :no-match-explanation ""))) - -(provide 'hytreemacs) +(provide 'hui-treemacs) diff --git a/hui-window.el b/hui-window.el index 1d3cbf4..a24f6d8 100644 --- a/hui-window.el +++ b/hui-window.el @@ -420,7 +420,8 @@ Signals an error if either depress or release buffer is read-only." ;; the kill; also, before the kill, restore the point to where it ;; was when the region was set. (hmouse-goto-release-point) - (let ((release-point (point-marker))) + (let ((release-point (point-marker)) + (release-window (if assist-flag assist-key-release-window action-key-release-window))) (if buffer-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 @@ -432,7 +433,8 @@ Signals an error if either depress or release buffer is read-only." ;; Now kill and yank the region into the Smart Key release buffer. (kill-region (or hkey-value (point)) (mark)) ;; Permanently return to release point - (select-window (if assist-flag assist-key-release-window action-key-release-window)) + (select-frame-set-input-focus (window-frame release-window)) + (select-window release-window) (goto-char release-point) ;; Protect from indentation errors (condition-case () @@ -455,7 +457,9 @@ Signals an error if the buffer is read-only." (error "(hmouse-yank-region): Use {%s} to enable yanking into this buffer." (hmouse-read-only-toggle-key)) ;; Permanently return to release point - (select-window (if assist-flag assist-key-release-window action-key-release-window)) + (let ((release-window (if assist-flag assist-key-release-window action-key-release-window))) + (select-frame-set-input-focus (window-frame release-window)) + (select-window release-window)) ;; Protect from indentation errors (condition-case () (hmouse-insert-region) @@ -854,7 +858,7 @@ item, this moves the menu buffer itself to the release location." ;; Otherwise, move the current menu item to the release window. (setq w1-ref (eval (cadr (assq major-mode hmouse-drag-item-mode-forms)))) (when w1-ref (hmouse-pulse-line) (sit-for 0.05)))) - (select-window w2) + (hypb:select-window-frame w2) (when (and new-window action-key-release-window) (hmouse-split-window)))) (unwind-protect diff --git a/hversion.el b/hversion.el index d9dc4d2..363dcc1 100644 --- a/hversion.el +++ b/hversion.el @@ -5,7 +5,7 @@ ;; ;; Orig-Date: 1-Jan-94 ;; -;; Copyright (C) 1994-2016 Free Software Foundation, Inc. +;; Copyright (C) 1994-2017 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -23,7 +23,7 @@ ;;; Public variables ;;; ************************************************************************ -(defconst hyperb:version "7.0.2" "GNU Hyperbole revision number.") +(defconst hyperb:version "7.0.2a" "GNU Hyperbole revision number.") ;;;###autoload (defvar hyperb:microcruft-os-p diff --git a/hycontrol.el b/hycontrol.el index 165ce8c..d429b57 100644 --- a/hycontrol.el +++ b/hycontrol.el @@ -278,6 +278,7 @@ The final predicate should always be t, for default values, typically of zero.") ;; Numeric keypad emulation for keyboards that lack one. (define-key map "p" (lambda () (interactive) (hycontrol-virtual-numeric-keypad hycontrol-arg))) (define-key map "q" 'hycontrol-quit-frames-mode) + (define-key map "Q" 'hycontrol-quit-frames-mode) (define-key map "r" 'raise-frame) (define-key map "s" (lambda () (interactive) (hycontrol-set-frame-height nil (- (frame-height) hycontrol-arg)))) (define-key map "t" 'hycontrol-enable-windows-mode) @@ -378,6 +379,7 @@ The final predicate should always be t, for default values, typically of zero.") ;; Numeric keypad emulation for keyboards that lack one. (define-key map "p" (lambda () (interactive) (hycontrol-virtual-numeric-keypad hycontrol-arg))) (define-key map "q" 'hycontrol-quit-windows-mode) + (define-key map "Q" 'hycontrol-quit-windows-mode) (define-key map "s" (lambda () (interactive) (shrink-window hycontrol-arg))) (define-key map "t" 'hycontrol-enable-frames-mode) (define-key map "u" 'unbury-buffer) @@ -859,16 +861,28 @@ is set to 1. If it is > `hycontrol-maximum-units', it is set to (keyboard-quit)) (defun hycontrol-quit-frames-mode () - "Globally quit HyControl Frames mode, typically on a press of {q}." + "Globally quit HyControl Frames mode, typically on a press of {q}. +If in a help buffer where {q} is bound to quit-window, run that +instead of quitting HyControl. Use {Q} to always quit from HyControl." (interactive) - (hycontrol-disable-modes) - (message "Finished controlling frames")) + ;; Allow for quitting from help windows displayed when HyControl is active. + (if (and (eq last-command-event ?q) + (eq (local-key-binding "q") #'quit-window)) + (call-interactively #'quit-window) + (hycontrol-disable-modes) + (message "Finished controlling frames"))) (defun hycontrol-quit-windows-mode () - "Globally quit HyControl Windows mode, typically on a press of {q}." + "Globally quit HyControl Windows mode, typically on a press of {q}. +If in a help buffer where {q} is bound to quit-window, run that +instead of quitting HyControl. Use {Q} to always quit from HyControl." (interactive) - (hycontrol-disable-modes) - (message "Finished controlling windows")) + ;; Allow for quitting from help windows displayed when HyControl is active. + (if (and (eq last-command-event ?q) + (eq (local-key-binding "q") #'quit-window)) + (call-interactively #'quit-window) + (hycontrol-disable-modes) + (message "Finished controlling windows"))) ;;;###autoload (define-global-minor-mode hycontrol-frames-mode hycontrol-local-frames-mode diff --git a/hypb.el b/hypb.el index 0076de6..a385e00 100644 --- a/hypb.el +++ b/hypb.el @@ -27,7 +27,7 @@ This should end with a space.") (defcustom hypb:rgrep-command - (format "%sgrep -insIHr " (if (executable-find "zgrep") "z" "")) + (format "%sgrep -insIHr" (if (executable-find "zgrep") "z" "")) "*Grep command string and initial arguments to send to `hypb:rgrep' command. It must end with a space." :type 'string @@ -607,12 +607,16 @@ If in an Emacs Lisp mode buffer and no PREFIX-ARG is given, limit search to only (grep-cmd (if (and (not current-prefix-arg) (equal (buffer-name) "*Locate*")) (format "%s -e \%c%s\%c %s" hypb:rgrep-command delim pattern delim (hypb:locate-pathnames)) - (format "%s%s -e \%c%s\%c ." + (format "%s %s -e \%c%s\%c ." hypb:rgrep-command (if (and (memq major-mode '(emacs-lisp-mode lisp-interaction-mode)) (not prefix-arg)) - "--include=\"*.el\" --include=\"*.el.gz\"" - "--exclude=\"*~\" --exclude=\"#*\" --exclude=\"TAGS\"") + (if (string-match "\\`rg " hypb:rgrep-command) + "-g \"*.el\" -g \"*.el.gz\"" + "--include=\"*.el\" --include=\"*.el.gz\"") + (if (string-match "\\`rg " hypb:rgrep-command) + "-g \"!*~\" -g \"!#*\" -g \"!TAGS\"" + "--exclude=\"*~\" --exclude=\"#*\" --exclude=\"TAGS\"")) delim pattern delim)))) (setq this-command `(grep ,grep-cmd)) (push this-command command-history) @@ -623,6 +627,20 @@ If in an Emacs Lisp mode buffer and no PREFIX-ARG is given, limit search to only (interactive "sSave lines with match for regexp: ") (keep-lines regexp nil nil t)) +(defmacro hypb:save-selected-window-and-input-focus (&rest body) + "Execute BODY, then restore the selected window in each frame and the previously selected frame with input focus. +The value returned is the value of the last form in BODY." + `(let ((frame (selected-frame))) + (prog1 (save-selected-window ,@body) + (select-frame-set-input-focus frame)))) + +(defun hypb:select-window-frame (window) + "Select WINDOW and its frame (set input focus there)." + (if (window-live-p window) + (progn (select-window window) + (select-frame-set-input-focus (window-frame window))) + (error "(hypb:select-window-frame): Argument must be a live window, not '%s'" window))) + (defun hypb:supercite-p () "Returns non-nil iff the Emacs add-on supercite package is in use." (let (hook-val) diff --git a/hyperbole-pkg.el b/hyperbole-pkg.el index d31bf5b..c2390d7 100644 --- a/hyperbole-pkg.el +++ b/hyperbole-pkg.el @@ -1,5 +1,5 @@ ;; -*- no-byte-compile: t -*- -(define-package "hyperbole" "7.0.2" "GNU Hyperbole: The Everyday Hypertextual Information Manager" +(define-package "hyperbole" "7.0.2a" "GNU Hyperbole: The Everyday Hypertextual Information Manager" '((emacs "24.4")) :url "http://www.gnu.org/software/hyperbole" :keywords '("comm" "convenience" "files" "frames" "hypermedia" "languages" diff --git a/hyperbole.el b/hyperbole.el index d8b4fbb..71ced94 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -6,7 +6,7 @@ ;; Maintainer: Bob Weiner and Mats Lidell ;; Created: 06-Oct-92 at 11:52:51 ;; Released: 23-Nov-17 -;; Version: 7.0.2 +;; Version: 7.0.2a ;; Keywords: comm, convenience, files, frames, hypermedia, languages, mail, matching, mouse, multimedia, outlines, tools, wp ;; Package: hyperbole ;; Package-Requires: ((emacs "24.4")) @@ -109,7 +109,7 @@ features (delq 'hversion features))) ;; Defines hyperb:path-being-loaded, hyperb:stack-frame, - ;; (hyperb:window-system), hyperb:dir and hyperb:kotl-p, which are used later in + ;; (hyperb:window-system) and hyperb:dir, which are used later in ;; this file. Also adds Hyperbole to the load-path if need be. ;; ;; This handles the case when the Hyperbole package directory is not yet in load-path. @@ -147,11 +147,9 @@ disables/inhibits support." (message "Hyperbole messaging button support is %s" (if inhibit-hyperbole-messaging "disabled" "enabled")))) -;; This must come after "hversion" is loaded for hyperb:kotl-p definition. -(if hyperb:kotl-p - (defgroup hyperbole-koutliner nil - "Hyperbole multi-level autonumbered outliner customizations." - :group 'hyperbole)) +(defgroup hyperbole-koutliner nil + "Hyperbole multi-level autonumbered outliner customizations." + :group 'hyperbole) ;;; ************************************************************************ ;;; Other required Elisp libraries @@ -473,8 +471,8 @@ With optional ARG, override them iff ARG is positive." ;; help buffer. (Help buffer names end with "Help*".) Only one of ;; these two settings is used, dependent on emacs version. ;; -(setq temp-buffer-show-hook #'hkey-help-show - temp-buffer-show-function temp-buffer-show-hook) +(add-hook 'temp-buffer-show-hook #'hkey-help-show) +(setq temp-buffer-show-function #'hkey-help-show) ;;; ************************************************************************ ;;; Autoloads diff --git a/hyrolo-menu.el b/hyrolo-menu.el index 0b59a1e..bc44159 100644 --- a/hyrolo-menu.el +++ b/hyrolo-menu.el @@ -120,8 +120,8 @@ ((featurep 'xemacs) (define-key hyrolo-mode-map 'button3 'hyrolo-popup-menu)) (t ;; hyperb:emacs-p - (define-key hyrolo-mode-map [down-mouse-3] 'hyrolo-popup-menu) - (define-key hyrolo-mode-map [mouse-3] nil))) + (define-key hyrolo-mode-map [C-down-mouse-3] 'hyrolo-popup-menu) + (define-key hyrolo-mode-map [C-mouse-3] nil))) (unless (cond (hyperb:emacs-p (global-key-binding [menu-bar Rolo])) ((boundp 'current-menubar) diff --git a/hywconfig.el b/hywconfig.el index 271ed4b..d11318f 100644 --- a/hywconfig.el +++ b/hywconfig.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 15-Mar-89 ;; -;; Copyright (C) 1989-2016 Free Software Foundation, Inc. +;; Copyright (C) 1989-2017 Free Software Foundation, Inc. ;; See the "../HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -132,10 +132,10 @@ Then deletes this new configuration from the ring." (let ((ring (hywconfig-get-ring))) (if (ring-empty-p ring) (error "(hywconfig-delete-pop): Window configuration save ring is empty.") - (ring-remove ring 0) (if (ring-empty-p ring) (message "Window configuration save ring is now empty.") - (hywconfig-set-window-configuration (ring-ref ring 0)))))) + (hywconfig-set-window-configuration (ring-ref ring 0)) + (ring-remove ring 0))))) ;;;###autoload (defun hywconfig-ring-empty-p () diff --git a/kotl/kmenu.el b/kotl/kmenu.el index 180ac00..918fc77 100644 --- a/kotl/kmenu.el +++ b/kotl/kmenu.el @@ -196,8 +196,8 @@ ((featurep 'xemacs) (define-key kotl-mode-map 'button3 'kotl-popup-menu)) (t ;; hyperb:emacs-p - (define-key kotl-mode-map [down-mouse-3] 'kotl-popup-menu) - (define-key kotl-mode-map [mouse-3] nil))) + (define-key kotl-mode-map [C-down-mouse-3] 'kotl-popup-menu) + (define-key kotl-mode-map [C-mouse-3] nil))) (unless (cond (hyperb:emacs-p (global-key-binding [menu-bar Koutline])) ((boundp 'current-menubar) diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el index 7f1b766..ade18b8 100644 --- a/kotl/kotl-mode.el +++ b/kotl/kotl-mode.el @@ -99,9 +99,9 @@ It provides the following keys: minor-mode-alist) minor-mode-alist (set:remove '(selective-display " Otl") minor-mode-alist) - ;; Remove indication that buffer is narrowed. - mode-line-format (copy-sequence mode-line-format) - mode-line-format (set:remove "%n" mode-line-format))) + ;; Remove indication that buffer is narrowed. + mode-line-format (copy-sequence mode-line-format) + mode-line-format (set:remove "%n" mode-line-format))) ;; (if (fboundp 'add-to-invisibility-spec) (add-to-invisibility-spec '(outline . t))) @@ -113,11 +113,11 @@ It provides the following keys: ;; These par* settings must be anchored to the bol since ;; kfill.el and `kotl-mode:fill-paragraph' use them in regexp ;; searches. - paragraph-separate "^[ \t]*$\\|^\^L") + paragraph-separate "^[ \t]*$\\|^\^L" paragraph-start "^[ \t]*$\\|^\^L" selective-display nil selective-display-ellipses t - track-eol t + track-eol t) ;; ;; This major-mode setting must come after the local variable settings but ;; before the koutline is formatted. diff --git a/man/hyperbole.html b/man/hyperbole.html index 951ce28..bd2b5c6 100644 --- a/man/hyperbole.html +++ b/man/hyperbole.html @@ -1,7 +1,7 @@