[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 60/77: Make easy-kill-on-buffer-file-name do nothing in easy-mark
From: |
Leo Liu |
Subject: |
[elpa] 60/77: Make easy-kill-on-buffer-file-name do nothing in easy-mark |
Date: |
Sat, 05 Apr 2014 04:08:25 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 5963535936064a2e885afff34b8476d8d3b7e668
Author: Leo Liu <address@hidden>
Date: Sun Oct 27 11:15:31 2013 +0800
Make easy-kill-on-buffer-file-name do nothing in easy-mark
---
easy-kill.el | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/easy-kill.el b/easy-kill.el
index a4684d4..a544d8c 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -207,10 +207,10 @@ candidate property instead."
(defun easy-kill-save-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.
+ ;; Don't modify the clipboard here since it is called in
+ ;; `pre-command-hook' per `easy-kill-activate-keymap' and will
+ ;; confuse `yank' if it is current command. Also
+ ;; `easy-kill-adjust-candidate' already did that.
(let ((interprogram-cut-function nil)
(interprogram-paste-function nil))
(kill-new (if easy-kill-append
@@ -401,14 +401,16 @@ Temporally activate additional key bindings as follows:
"Get `buffer-file-name' or `default-directory'.
If N is zero, remove the directory part; -, remove the file name
party; +, full path."
- (let ((file (or buffer-file-name default-directory)))
- (when file
- (let* ((file (directory-file-name file))
- (text (pcase n
- (`- (file-name-directory file))
- ((pred (eq 0)) (file-name-nondirectory file))
- (_ file))))
- (easy-kill-adjust-candidate 'buffer-file-name text)))))
+ (if easy-kill-mark
+ (easy-kill-message-nolog "Not supported in `easy-mark'")
+ (let ((file (or buffer-file-name default-directory)))
+ (when file
+ (let* ((file (directory-file-name file))
+ (text (pcase n
+ (`- (file-name-directory file))
+ ((pred (eq 0)) (file-name-nondirectory file))
+ (_ file))))
+ (easy-kill-adjust-candidate 'buffer-file-name text))))))
;;; Handler for `url'.
- [elpa] 57/77: Fix to always display the string candidate, (continued)
- [elpa] 57/77: Fix to always display the string candidate, Leo Liu, 2014/04/05
- [elpa] 58/77: Emacs 24.x compatibility, Leo Liu, 2014/04/05
- [elpa] 53/77: Destroy after-string before goto-char in easy-kill-abort, Leo Liu, 2014/04/05
- [elpa] 54/77: Better control of message emission in an easy-kill session, Leo Liu, 2014/04/05
- [elpa] 63/77: Teach easy-kill-activate-keymap to handle command remapping, Leo Liu, 2014/04/05
- [elpa] 59/77: Doc fix, Leo Liu, 2014/04/05
- [elpa] 64/77: Teach easy-kill to handle rectangle-mark from Emacs trunk, Leo Liu, 2014/04/05
- [elpa] 56/77: Doc fix and release v0.9.0, Leo Liu, 2014/04/05
- [elpa] 61/77: Optimise easy-kill-thing-forward when n is 0, Leo Liu, 2014/04/05
- [elpa] 62/77: Small tweak to easy-kill-on-nxml-element, Leo Liu, 2014/04/05
- [elpa] 60/77: Make easy-kill-on-buffer-file-name do nothing in easy-mark,
Leo Liu <=
- [elpa] 68/77: Fix easy-kill-append to update clipboard, Leo Liu, 2014/04/05
- [elpa] 65/77: Fix #8: Don't strip trailing blank chars, Leo Liu, 2014/04/05
- [elpa] 67/77: New handler for defun-name and bind it to `D', Leo Liu, 2014/04/05
- [elpa] 66/77: Fix #9: Work around fixed bug in thingatpt.el, Leo Liu, 2014/04/05
- [elpa] 71/77: In no case should easy-kill-activate-keymap err, Leo Liu, 2014/04/05
- [elpa] 70/77: Adapt to upstream change, Leo Liu, 2014/04/05
- [elpa] 72/77: Rename easy-kill-backward-down to easy-kill-forward-down, Leo Liu, 2014/04/05
- [elpa] 73/77: Support list expand/shrink on js2 nodes, Leo Liu, 2014/04/05
- [elpa] 74/77: Require cl-lib, Leo Liu, 2014/04/05
- [elpa] 76/77: Add easy-kill to externals-list, Leo Liu, 2014/04/05