[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 37/77: Make easy-kill-backward-up work better when in strings
From: |
Leo Liu |
Subject: |
[elpa] 37/77: Make easy-kill-backward-up work better when in strings |
Date: |
Sat, 05 Apr 2014 04:08:18 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 6c18c835e2a8da3e9b457fd13eb2b6c89f4e853e
Author: Leo Liu <address@hidden>
Date: Fri Oct 11 07:36:31 2013 +0800
Make easy-kill-backward-up work better when in strings
---
easy-kill.el | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/easy-kill.el b/easy-kill.el
index d92a64b..9b8a658 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -118,18 +118,18 @@ candidate property instead."
(funcall interprogram-cut-function (easy-kill-candidate))))
(defun easy-kill-save-candidate ()
- ;; Do not modify the clipboard here because it may be called in
- ;; `pre-command-hook' and will confuse `yank' if it is the next
- ;; command. Also `easy-kill-adjust-candidate' already did the work.
- (let ((interprogram-cut-function nil)
- (interprogram-paste-function nil))
- (unless (string= (easy-kill-candidate) "")
+ (unless (string= (easy-kill-candidate) "")
+ ;; Do not modify the clipboard here because this may be called in
+ ;; `pre-command-hook' and will confuse `yank' if it is the next
+ ;; command. Also `easy-kill-adjust-candidate' already did the
+ ;; work.
+ (let ((interprogram-cut-function nil)
+ (interprogram-paste-function nil))
(kill-new (if easy-kill-append
- (concat (car kill-ring) "\n"
- (easy-kill-candidate))
+ (concat (car kill-ring) "\n" (easy-kill-candidate))
(easy-kill-candidate))
- easy-kill-append)
- t)))
+ easy-kill-append))
+ t))
(defun easy-kill-destroy-candidate ()
(let ((hook (make-symbol "easy-kill-destroy-candidate")))
@@ -313,10 +313,14 @@ inspected."
(return url)))))))
(defun easy-kill-backward-up ()
- (condition-case nil
- (up-list -1)
- (scan-error (let ((ppss (syntax-ppss)))
- (and (nth 3 ppss) (goto-char (nth 8 ppss)))))))
+ (let ((ppss (syntax-ppss)))
+ (condition-case nil
+ (progn
+ (up-list -1)
+ ;; `up-list' may jump to another string.
+ (when (and (nth 3 ppss) (< (point) (nth 8 ppss)))
+ (goto-char (nth 8 ppss))))
+ (scan-error (and (nth 3 ppss) (goto-char (nth 8 ppss)))))))
(defun easy-kill-backward-down (point &optional bound)
(condition-case nil
- [elpa] 27/77: Declare dependency on emacs 24, (continued)
- [elpa] 27/77: Declare dependency on emacs 24, Leo Liu, 2014/04/05
- [elpa] 29/77: Merge pull request #4 from purcell/patch-1, Leo Liu, 2014/04/05
- [elpa] 31/77: Simplify the interactive form of easy-kill-thing, Leo Liu, 2014/04/05
- [elpa] 28/77: [remap kill-ring-save] should be a better key binding for this feature., Leo Liu, 2014/04/05
- [elpa] 35/77: Doc fix and release v0.8.0, Leo Liu, 2014/04/05
- [elpa] 36/77: New variable easy-kill-base-map for customising key bindings, Leo Liu, 2014/04/05
- [elpa] 33/77: Support append kill for append-next-kill and easy-kill, Leo Liu, 2014/04/05
- [elpa] 34/77: Better support for defining commands that exit easy-kill, Leo Liu, 2014/04/05
- [elpa] 30/77: Merge pull request #6 from knu/usage-remap, Leo Liu, 2014/04/05
- [elpa] 32/77: Improve easy-kill-bounds-of-list, Leo Liu, 2014/04/05
- [elpa] 37/77: Make easy-kill-backward-up work better when in strings,
Leo Liu <=
- [elpa] 38/77: Fix #3: Add command easy-mark for marking, Leo Liu, 2014/04/05
- [elpa] 39/77: Fix doc and buglets in last change, Leo Liu, 2014/04/05
- [elpa] 40/77: Some improvements based on comments in #3, Leo Liu, 2014/04/05
- [elpa] 42/77: Must reference the actual object in easy-kill-candidate, Leo Liu, 2014/04/05
- [elpa] 43/77: Add new command easy-mark-sexp, Leo Liu, 2014/04/05
- [elpa] 41/77: Tell easy-kill-append to deactivate-mark, Leo Liu, 2014/04/05
- [elpa] 44/77: Fix #7: Add new command easy-kill-abort for key C-g, Leo Liu, 2014/04/05
- [elpa] 45/77: Better origin indicator by easy-kill-indicate-origin, Leo Liu, 2014/04/05
- [elpa] 46/77: Teach easy-kill-abort to deactivate mark immediately, Leo Liu, 2014/04/05
- [elpa] 47/77: Doc fix and small tweaks, Leo Liu, 2014/04/05