emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/easy-kill bf28f77 04/14: Add `D' for selecting current


From: Stefan Monnier
Subject: [elpa] externals/easy-kill bf28f77 04/14: Add `D' for selecting current defun name
Date: Mon, 15 Mar 2021 22:20:16 -0400 (EDT)

branch: externals/easy-kill
commit bf28f7724eafcc1603f9abbc0c0c957561696e5c
Author: Leo Liu <sdl.web@gmail.com>
Commit: Leo Liu <sdl.web@gmail.com>

    Add `D' for selecting current defun name
    
    This can be handy for languages such as erlang where a defun is a
    combination of name and arity.
    
    Fix test-org-mode failure on emacs trunk.
---
 README.rst   |  2 ++
 easy-kill.el | 13 +++++++------
 test.el      |  3 ++-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/README.rst b/README.rst
index 4e109f8..d0e3263 100644
--- a/README.rst
+++ b/README.rst
@@ -29,6 +29,7 @@ active region, url, email and finally current line (See
 #. ``M-w s``: save sexp at point
 #. ``M-w l``: save list at point (enclosing sexp)
 #. ``M-w d``: save defun at point
+#. ``M-w D``: save current defun name
 #. ``M-w f``: save file at point
 #. ``M-w b``: save ``buffer-file-name`` or ``default-directory``.
    ``-`` changes the kill to the directory name, ``+`` to full name
@@ -99,6 +100,7 @@ NEWS
 +++++
 
 #. New user variable ``easy-kill-unhighlight-key``.
+#. key ``D`` selects current defun name.
 
 0.9.3
 +++++
diff --git a/easy-kill.el b/easy-kill.el
index 29cb4bb..e063139 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -72,12 +72,13 @@
         (add-hook 'pre-command-hook clearfunsym)
         (push alist emulation-mode-map-alists))))))
 
-(defcustom easy-kill-alist '((?w word     " ")
-                             (?s sexp     "\n")
-                             (?l list     "\n")
-                             (?f filename "\n")
-                             (?d defun    "\n\n")
-                             (?e line     "\n")
+(defcustom easy-kill-alist '((?w word           " ")
+                             (?s sexp           "\n")
+                             (?l list           "\n")
+                             (?f filename       "\n")
+                             (?d defun          "\n\n")
+                             (?D defun-name     " ")
+                             (?e line           "\n")
                              (?b buffer-file-name))
   "A list of (CHAR THING APPEND).
 CHAR is used immediately following `easy-kill' to select THING.
diff --git a/test.el b/test.el
index 6458d4c..8386aa6 100644
--- a/test.el
+++ b/test.el
@@ -294,7 +294,8 @@ This is an example of org document.
   + Porsche
 "))
     (with-temp-buffer
-      (org-mode)
+      ;; http://debbugs.gnu.org/17724
+      (ignore-errors (org-mode))
       (insert org)
       (goto-char (point-min))
       (search-forward "This is")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]