branch: externals/ergoemacs-mode
commit e778e820787d1873ba539efde6863997781cc5e3
Author: Matthew Fidler <[email protected]>
Commit: Matthew Fidler <[email protected]>
Take out debug echo AND fix backward delete
---
ergoemacs-cua.el | 6 ++----
ergoemacs-functions.el | 29 ++++++++++++++++-------------
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/ergoemacs-cua.el b/ergoemacs-cua.el
index 6584e63..cf53284 100644
--- a/ergoemacs-cua.el
+++ b/ergoemacs-cua.el
@@ -132,11 +132,9 @@ This override is enabled for active regions before the
copy and paste are enable
(setq ergoemacs--ena-region-keymap nil
ergoemacs--ena-prefix-override-keymap nil
ergoemacs--ena-prefix-repeat-keymap nil
- ergoemacs-mode nil)
- (message "disable ergoemacs again"))
+ ergoemacs-mode nil))
(setq ergoemacs--temporary-disable nil
- ergoemacs-mode t))
- (message "enable ergoemacs again"))
+ ergoemacs-mode t)))
(when ergoemacs-mode
;; The prefix override (when mark-active) operates in three substates:
;; [1] Before using a prefix key
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 14f6ffa..5066c60 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -114,16 +114,7 @@ REPEAT is the flag that tells it if is repeated
environmennt."
;; Push the key back on the event queue
(setq unread-command-events (list (cons 'no-record key))))
-(defun ergoemacs-kill-line (&optional arg)
- "Kill the rest of the (visual) line.
-This is often `kill-visual-line' or `kill-line'.
-
-The ARG was is used in the above functions, and is called by
-temporarily turning off `ergoemacs-mode' and then sending the
-emacs defualt kill line control k key to the `unread-command-events'"
- (interactive "P")
- (ergoemacs--send-emacs-key ?\C-k))
@@ -1132,14 +1123,26 @@ Subsequent calls expands the selection to larger
semantic unit."
;;; TEXT TRANSFORMATION RELATED
+(defun ergoemacs-kill-line (&optional arg)
+ "Kill the rest of the (visual) line.
+
+This is often `kill-visual-line' or `kill-line'.
+
+The ARG was is used in the above functions, and is called by
+temporarily turning off `ergoemacs-mode' and then sending the
+emacs defualt kill line control k key to the `unread-command-events'"
+ (interactive "P")
+ (ergoemacs--send-emacs-key ?\C-k))
+
(defun ergoemacs-kill-line-backward (&optional number)
"Kill text between the beginning of the line to the cursor position.
If there's no text, delete the previous line ending."
(interactive "p")
- (if (and (= number 1) (looking-back "\n" nil))
- (delete-char -1)
- (setq current-prefix-arg (- 1 number))
- (kill-line)))
+ (save-match-data
+ (if (looking-back "\n" nil)
+ (delete-char -1)
+ (setq current-prefix-arg '(0))
+ (ergoemacs--send-emacs-key ?\C-k))))
(defun ergoemacs-move-cursor-previous-pane (&optional number)
"Move cursor to the previous pane."