[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 230/287: Fix `ergoemacs-beginning-of-line-or-what` and `ergoemacs
From: |
Matthew Fidler |
Subject: |
[elpa] 230/287: Fix `ergoemacs-beginning-of-line-or-what` and `ergoemacs-end-of-line-or-what` |
Date: |
Wed, 02 Jul 2014 14:46:14 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 148efdf6058a80772109b91d3866707971c4c173
Author: Matthew L. Fidler <address@hidden>
Date: Thu Jun 26 11:06:58 2014 -0500
Fix `ergoemacs-beginning-of-line-or-what` and
`ergoemacs-end-of-line-or-what`
---
ergoemacs-functions.el | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 9ccd8f1..1d1bf91 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -617,11 +617,14 @@ the prefix arguments of `beginning-of-buffer',
(progn
(cond
((eq ergoemacs-beginning-or-end-of-line-and-what 'buffer)
- (ergoemacs-shortcut-remap 'beginning-of-buffer))
+ (ergoemacs-shortcut-remap 'beginning-of-buffer)
+ (setq this-command 'beginning-of-buffer))
((eq ergoemacs-beginning-or-end-of-line-and-what 'block)
- (ergoemacs-shortcut-remap 'ergoemacs-backward-block))
+ (ergoemacs-shortcut-remap 'ergoemacs-backward-block)
+ (setq this-command 'ergoemacs-backward-block))
((eq ergoemacs-beginning-or-end-of-line-and-what 'page)
- (ergoemacs-shortcut-remap 'scroll-down-command)))
+ (ergoemacs-shortcut-remap 'scroll-down-command)
+ (setq this-command 'scroll-down-command)))
(beginning-of-line))
(setq N (or N 1))
(when (not (= 1 N))
@@ -633,6 +636,7 @@ the prefix arguments of `beginning-of-buffer',
;; (setq prefix-arg nil)
(setq current-prefix-arg nil)
(ergoemacs-shortcut-remap 'move-beginning-of-line)
+ (setq this-command 'move-beginning-of-line)
(push (point) pts))
(when ergoemacs-back-to-indentation
(save-excursion
@@ -642,14 +646,13 @@ the prefix arguments of `beginning-of-buffer',
(save-excursion
(when (not (eolp))
(forward-char 1))
- (let ((cs (condition-case err
+ (let ((cs (ignore-errors
(let ((tmp (comment-search-backward (point-at-bol) t)))
(if (and font-lock
(not
(eq (get-text-property (point) 'face)
'font-lock-comment-face))) nil
- tmp))
- (error nil))))
+ tmp)))))
(when cs
(skip-syntax-forward " " (point-at-eol))
(unless (looking-at "$")
@@ -661,8 +664,11 @@ the prefix arguments of `beginning-of-buffer',
((not pts)
(call-interactively 'move-beginning-of-line))
(t
- (setq pts (sort pts '>))
+ (setq pts (sort pts '<))
(dolist (x pts)
+ (save-excursion
+ (goto-char x)
+ (looking-at ".*"))
(unless (>= x (point))
(push x tmp)))
(setq pts tmp)
@@ -731,11 +737,14 @@ the prefix arguments of `end-of-buffer',
(progn
(cond
((eq ergoemacs-beginning-or-end-of-line-and-what 'buffer)
- (ergoemacs-shortcut-remap 'end-of-buffer))
+ (ergoemacs-shortcut-remap 'end-of-buffer)
+ (setq this-command 'end-of-buffer))
((eq ergoemacs-beginning-or-end-of-line-and-what 'block)
- (ergoemacs-shortcut-remap 'ergoemacs-forward-block))
+ (ergoemacs-shortcut-remap 'ergoemacs-forward-block)
+ (setq this-command 'ergoemacs-forward-block))
((eq ergoemacs-beginning-or-end-of-line-and-what 'page)
(ergoemacs-shortcut-remap 'scroll-up-command)
+ (setq this-command 'scroll-up-command)
(beginning-of-line))))
(setq N (or N 1))
(when (not (= 1 N))
@@ -745,6 +754,7 @@ the prefix arguments of `end-of-buffer',
(setq current-prefix-arg nil)
(save-excursion
(call-interactively 'move-end-of-line)
+ (setq this-command 'move-end-of-line)
(push (point) pts))
(when ergoemacs-end-of-comment-line
(save-excursion
@@ -758,7 +768,8 @@ the prefix arguments of `end-of-buffer',
(push (point) pts)))))
(cond
((not pts)
- (call-interactively 'move-end-of-line))
+ (call-interactively 'move-end-of-line)
+ (setq this-command 'move-end-of-line))
(t
(setq pts (sort pts '<))
(dolist (x pts)
- [elpa] 221/287: Be more careful with links. Issue #247, (continued)
- [elpa] 221/287: Be more careful with links. Issue #247, Matthew Fidler, 2014/07/02
- [elpa] 225/287: Added disabling to redo based on undo-tree-mode, Matthew Fidler, 2014/07/02
- [elpa] 218/287: Merge branch 'master' of github.com:ergoemacs/ergoemacs-mode, Matthew Fidler, 2014/07/02
- [elpa] 231/287: Change layout descriptions, Matthew Fidler, 2014/07/02
- [elpa] 229/287: Fix order of operations, Matthew Fidler, 2014/07/02
- [elpa] 226/287: Remove default redo keys; Possibly Fix Issue #242, Matthew Fidler, 2014/07/02
- [elpa] 224/287: Make undo-tree the default undo method and installed when ergoemacs-mode is installed. Issue #242, Matthew Fidler, 2014/07/02
- [elpa] 228/287: Add `cua-rect` require so that tests pass, Matthew Fidler, 2014/07/02
- [elpa] 219/287: `ergoemacs-select-text-in-quote' can now deal with escaped quote in string., Matthew Fidler, 2014/07/02
- [elpa] 233/287: Change the default option back, Matthew Fidler, 2014/07/02
- [elpa] 230/287: Fix `ergoemacs-beginning-of-line-or-what` and `ergoemacs-end-of-line-or-what`,
Matthew Fidler <=
- [elpa] 227/287: Be more careful of cua--rectangle, Matthew Fidler, 2014/07/02
- [elpa] 232/287: Fix beginning of line function again..., Matthew Fidler, 2014/07/02
- [elpa] 238/287: Fix warnings for cua-clear-rectangle-mark., Matthew Fidler, 2014/07/02
- [elpa] 240/287: Move the fixed bracket moving to the bracket theme component., Matthew Fidler, 2014/07/02
- [elpa] 236/287: add electric-pair-made as an option, Matthew Fidler, 2014/07/02
- [elpa] 237/287: Expanded outlook integration with Emacs org-mode, Matthew Fidler, 2014/07/02
- [elpa] 234/287: Make comment-search-backward less fragile, Matthew Fidler, 2014/07/02
- [elpa] 235/287: Add the uri encoding function, Matthew Fidler, 2014/07/02
- [elpa] 241/287: Cleanup for select text in quotes, Matthew Fidler, 2014/07/02
- [elpa] 243/287: Make the quote selection consistent., Matthew Fidler, 2014/07/02