[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 2f52190 44/51: Koutliner: Add support for Ema
From: |
Stefan Monnier |
Subject: |
[elpa] externals/hyperbole 2f52190 44/51: Koutliner: Add support for Emacs visual-line commands |
Date: |
Sun, 12 Jul 2020 18:10:18 -0400 (EDT) |
branch: externals/hyperbole
commit 2f521904be53d93dc924a78e60381a5473604a0c
Author: Bob Weiner <Bob.Weiner@DuffandPhelps.com>
Commit: Bob Weiner <Bob.Weiner@DuffandPhelps.com>
Koutliner: Add support for Emacs visual-line commands
---
Changes | 6 ++++++
HY-NEWS | 7 ++++++-
kotl/kotl-mode.el | 30 ++++++++++++++++++------------
3 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/Changes b/Changes
index 49e347d..ecbdb41 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,9 @@
+2020-05-09 Bob Weiner <rsw@gnu.org>
+
+* kotl/kotl-mode.el (beginning-of-visual-line,
+ end-of-visual-line,
+ kill-visual-line): Override in kotl-mode-map.
+
2020-03-11 Bob Weiner <rsw@gnu.org>
* kotl/klink.el (require 'kcell): Removed, caused recursive require loop.
diff --git a/HY-NEWS b/HY-NEWS
index cff2818..bf17fc3 100644
--- a/HY-NEWS
+++ b/HY-NEWS
@@ -8,13 +8,18 @@
BUTTON TYPES
- Link Creation via Drag: Automatic link referent detection has been
- expanded. You can now drag the Smart Mouse Key or use
+ expanded. You can now drag the Smart Mouse Key across windows or use
'hkey-operate' to create an explicit link button to an Emacs
Bookmark or to a Texinfo Node.
- link-to-texinfo-node Action Type: Now takes a first file parameter,
rather than only working on the current buffer.
+ KOUTLINER
+
+ - Support use of these additional Emacs commands: beginning-of-visual-line,
+ end-of-visual-line, and kill-visual-line.
+
MENUS
- Gbut/Create: When invoked with a prefix argument, will create a
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index 0adb30f..3cf210b 100644
--- a/kotl/kotl-mode.el
+++ b/kotl/kotl-mode.el
@@ -560,6 +560,8 @@ With optional prefix argument TOP-P non-nil, refill all
cells in the outline."
(kotl-mode:kill-region start end))))))
(setq last-command 'kill-region))
+(defalias 'kotl-mode:kill-visual-line 'kotl-mode:kill-line)
+
(defun kotl-mode:kill-region (start end &optional copy-p)
"Kill region between START and END within a single kcell.
With optional COPY-P equal to 't, copy region to kill ring but does not
@@ -1208,7 +1210,7 @@ See also the command `yank-pop' (\\[yank-pop])."
;; Convert all occurrences of newline to newline + cell indent.
;; Then insert into buffer.
(insert (hypb:replace-match-string
- "[\n\r]" yank-text (concat "\\0" indent-str))))
+ "[\n\r]" yank-text (lambda (match) (concat match indent-str)))))
(if (consp arg) (kotl-mode:exchange-point-and-mark))
;; If we do get all the way thru, make this-command indicate that.
(if (eq this-command t) (setq this-command 'kotl-mode:yank))
@@ -1405,6 +1407,7 @@ See `forward-paragraph' for more information."
;;; This ensures that the key bound to `beginning-of-line' is replaced in
kotl-mode.
(defalias 'kotl-mode:beginning-of-line 'kotl-mode:to-start-of-line)
+(defalias 'kotl-mode:beginning-of-visual-line 'kotl-mode:to-start-of-line)
(defalias 'kotl-mode:move-beginning-of-line 'kotl-mode:beginning-of-line)
(defun kotl-mode:beginning-of-tree ()
@@ -1479,6 +1482,7 @@ With optional ARG < 0, move to the ARGth previous visible
cell."
;;; This ensures that the key bound to `end-of-line' is replaced in kotl-mode.
(defalias 'kotl-mode:end-of-line 'kotl-mode:to-end-of-line)
+(defalias 'kotl-mode:end-of-visual-line 'kotl-mode:to-end-of-line)
(defalias 'kotl-mode:move-end-of-line 'kotl-mode:to-end-of-line)
(defun kotl-mode:end-of-tree ()
@@ -2996,10 +3000,10 @@ Leave point at end of line now residing at START."
(copy-keymap text-mode-map)))
(t (make-keymap))))
;; Ensure mouse wheel scrolling leaves point in a valid Koutline position
- (if (and (boundp 'mwheel-scroll-up-function)
- (eq (symbol-value 'mwheel-scroll-up-function) 'scroll-up))
- (setq mwheel-scroll-up-function 'kotl-mode:scroll-up
- mwheel-scroll-down-function 'kotl-mode:scroll-down))
+ (when (and (boundp 'mwheel-scroll-up-function)
+ (eq (symbol-value 'mwheel-scroll-up-function) 'scroll-up))
+ (setq mwheel-scroll-up-function 'kotl-mode:scroll-up
+ mwheel-scroll-down-function 'kotl-mode:scroll-down))
;; Overload edit keys to deal with structure and labels.
(let (local-cmd)
(mapc
@@ -3008,13 +3012,12 @@ Leave point at end of line now residing at START."
(concat "kotl-mode:" (symbol-name cmd))))
;; Only bind key locally if kotl-mode local-cmd has already
;; been defined and cmd is a valid function.
- (if (and local-cmd (fboundp cmd))
- (progn
- ;; Make local-cmd have the same property list as cmd,
- ;; e.g. so pending-delete property is the same.
- (setplist local-cmd (symbol-plist cmd))
- (substitute-key-definition
- cmd local-cmd kotl-mode-map global-map))))
+ (when (and local-cmd (fboundp cmd))
+ ;; Make local-cmd have the same property list as cmd,
+ ;; e.g. so pending-delete property is the same.
+ (setplist local-cmd (symbol-plist cmd))
+ (substitute-key-definition
+ cmd local-cmd kotl-mode-map global-map)))
'(
back-to-indentation
@@ -3029,6 +3032,7 @@ Leave point at end of line now residing at START."
backward-word
beginning-of-buffer
beginning-of-line
+ beginning-of-visual-line
completion-kill-region
copy-region-as-kill
copy-to-register
@@ -3040,6 +3044,7 @@ Leave point at end of line now residing at START."
delete-indentation
end-of-buffer
end-of-line
+ end-of-visual-line
fill-paragraph
fill-paragraph-or-region
;; cursor keys
@@ -3058,6 +3063,7 @@ Leave point at end of line now residing at START."
just-one-space
kill-word
kill-line
+ kill-visual-line
kill-region
kill-ring-save
kill-sentence
- [elpa] externals/hyperbole 0e1203c 32/51: Publish 7.1.0 test release, (continued)
- [elpa] externals/hyperbole 0e1203c 32/51: Publish 7.1.0 test release, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole c565349 33/51: Fix entry addition which was failing due to level handling change, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole db4dd6c 13/51: Use float for delay instead of looping (#21), Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 5119a4c 17/51: hui-em-but.el: Properly highlight explicit buttons when loading, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 9a94a8f 19/51: Fix hproperty:item-highlight-color init error; add regional 'throw', Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 45fff9a 23/51: Many bug fixes and improvements, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 6e55a34 34/51: Fix ebut:get calls to send file as 3rd arg, not 2nd, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole b430d10 36/51: hpath:find: Was called with point in the source, not referent buffer, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 3d26ccb 40/51: Fix require of 'help-mode' instead of 'help' to remedy 'make bin', Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 56e88ca 47/51: Merge branch 'master' of hyperbole, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 2f52190 44/51: Koutliner: Add support for Emacs visual-line commands,
Stefan Monnier <=
- [elpa] externals/hyperbole 2253ac2 50/51: V7.1.2 release, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 7184b30 51/51: Fix ibut:delete, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 07c0664 21/51: Org-mode local binding of M-RET activates Hyperbole implicit buttons, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole f2a5c27 22/51: Fixed errors in using hyrolo-logic operators, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole ecc8f36 24/51: Smart Key live window resizing and frame dragging; auto-autoload gen, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole cb7827c 26/51: Swapping buffer improvements; handle grep lines with null separators, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 73fed44 28/51: Fix in-buffer text as ebut label; allow line/col in link-to-file, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole f98ce2a 29/51: Fix colorized display of HyRolo match terms on initial use., Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole 7a14688 30/51: Update manual with bottommost modeline frame drags and Bookmarks, Stefan Monnier, 2020/07/12
- [elpa] externals/hyperbole bf73086 31/51: Generalize in-buffer button completion UI; Hyperbole manual updates, Stefan Monnier, 2020/07/12