[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev da1aa60 08/20: Added `find-esetkey-links'.
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eev da1aa60 08/20: Added `find-esetkey-links'. |
Date: |
Mon, 4 Jan 2021 01:01:49 -0500 (EST) |
branch: externals/eev
commit da1aa60d10eaf79a26ba9f405499582d3b61a776
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Added `find-esetkey-links'.
---
ChangeLog | 17 +++++++++++++
VERSION | 4 +--
eev-blinks.el | 7 ++++++
eev-elinks.el | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
eev-testblocks.el | 14 ++++++++++-
eev-wrap.el | 13 ++++++----
6 files changed, 119 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a9c91ac..9b45e65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2020-12-16 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-elinks.el (find-esetkey-links): new function.
+ (ee-read-command): new function.
+ (ee-command-at-point): new function.
+
+ * eev-testblocks.el (ee-insert-test-org-mode): new function.
+
+2020-12-06 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-wrap.el (ee-ppp0): new function.
+
+ * eev-blinks.el (find-eppp): new function.
+
+ * eev-elinks.el (ee-find-efunction-links): added a line with
+ `(find-eppp (mapcar 'car load-history))'.
+
2020-12-03 Eduardo Ochs <eduardoochs@gmail.com>
* eev-pdflike.el (ee-pdftools-revert-all): new function.
diff --git a/VERSION b/VERSION
index f0cd40c..84e90b8 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sat Dec 5 03:59:32 GMT 2020
-Sat Dec 5 00:59:32 -03 2020
+Thu Dec 17 09:31:29 GMT 2020
+Thu Dec 17 06:31:29 -03 2020
diff --git a/eev-blinks.el b/eev-blinks.el
index 528a763..c10f89a 100644
--- a/eev-blinks.el
+++ b/eev-blinks.el
@@ -804,6 +804,13 @@ explicitly. Try this: (progn (message \"foo\") \"bar\")"
(let ((ee-buffer-name (or ee-buffer-name "*pp*")))
(apply 'find-estring-elisp (pp-to-string object) pos-spec-list)))
+(defun find-eppp (object &rest pos-spec-list)
+ "Visit a temporary buffer containing a pretty-printed version of OBJECT.
+This is a variant of `find-epp' that is more suitable for objects
+that `find-epp' would print in a single line."
+ (let ((ee-buffer-name (or ee-buffer-name "*pp*")))
+ (apply 'find-estring-elisp (ee-ppp0 object) pos-spec-list)))
+
(defun find-efunctionpp (symbol &rest pos-spec-list)
"Visit a temporary buffer containing the pretty-printed Lisp code for SYMBOL."
(interactive (find-function-read))
diff --git a/eev-elinks.el b/eev-elinks.el
index 1894850..725ced8 100644
--- a/eev-elinks.el
+++ b/eev-elinks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 2020nov01
+;; Version: 2020dec16
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-elinks.el>
@@ -77,6 +77,7 @@
;; «.find-color-links» (to "find-color-links")
;; «.find-epackage-links» (to "find-epackage-links")
;; «.ee-package-dir» (to "ee-package-dir")
+;; «.find-esetkey-links» (to "find-esetkey-links")
;; «.find-code-pdf-links» (to "find-code-pdf-links")
;; «.find-pdf-links» (to "find-pdf-links")
@@ -274,6 +275,7 @@ This is an internal function used by `find-efunction-links'
and
(symbol-file ',f 'defun)
(find-fline (symbol-file ',f 'defun))
(find-epp (assoc (symbol-file ',f 'defun) load-history))
+ (find-eppp (mapcar 'car load-history))
(find-estring (mapconcat 'identity (mapcar 'car load-history) "\n"))
(find-estring (documentation ',f))
(find-estring (documentation ',f t))
@@ -1269,6 +1271,75 @@ Convert PKG - a symbol - to a package-desc structure (or
to nil)."
+;;; __ _ _ _ _
+;;; / _(_)_ __ __| | ___ ___ ___| |_| | _____ _ _
+;;; | |_| | '_ \ / _` |_____ / _ \/ __|/ _ \ __| |/ / _ \ | | |
+;;; | _| | | | | (_| |_____| __/\__ \ __/ |_| < __/ |_| |
+;;; |_| |_|_| |_|\__,_| \___||___/\___|\__|_|\_\___|\__, |
+;;; |___/
+;;
+;; «find-esetkey-links» (to ".find-esetkey-links")
+;; Skel: (find-find-links-links-new "esetkey" "key command" "longkey")
+;; Test: (find-esetkey-links (kbd "M-o") 'other-window)
+;;
+(defun find-esetkey-links (&optional key command &rest pos-spec-list)
+ "Visit a temporary buffer containing sexps for setting a key."
+ (interactive
+ (let* ((menu-prompting nil)
+ (key (read-key-sequence "Set key: " nil t))
+ (longkey (format-kbd-macro key))
+ (command (ee-read-command)))
+ (list key command)))
+ (setq key (or key (kbd "M-o")))
+ (setq command (or command 'other-window))
+ (let* ((longkey (format-kbd-macro key)))
+ (apply
+ 'find-elinks-elisp
+ `((find-esetkey-links (kbd ,longkey) ',command ,@pos-spec-list)
+ (find-esetkey-links (kbd "M-o") 'other-window ,@pos-spec-list)
+ ;; Convention: the first sexp always regenerates the buffer.
+ (find-ekeydescr (kbd ,longkey))
+ (find-efunctiondescr ',command)
+ (find-efunction 'find-esetkey-links)
+ ""
+ (find-enode "Rebinding" "M-x global-set-key")
+ (find-elnode "Changing Key Bindings" "Function: define-key")
+ (find-efunctiondescr 'global-set-key)
+ (find-efunctiondescr 'global-unset-key)
+ (find-efunctiondescr 'local-set-key)
+ (find-efunctiondescr 'local-unset-key)
+ (find-efunctiondescr 'define-key)
+ (find-efunctiondescr 'kbd)
+ (find-enode "Misc Help" "describe-bindings")
+ (eek "C-h b ;; describe-bindings")
+ ""
+ ,(ee-template0 "\
+(global-set-key (kbd \"{longkey}\") '{command})
+(global-unset-key (kbd \"{longkey}\"))
+
+(local-set-key (kbd \"{longkey}\") '{command})
+(local-unset-key (kbd \"{longkey}\"))
+
+;; (find-ekeymapdescr eev-mode-map)
+(define-key eev-mode-map (kbd \"{longkey}\") '{command})
+(define-key eev-mode-map (kbd \"{longkey}\") nil)
+")
+ )
+ pos-spec-list)))
+
+(defun ee-read-command ()
+ "An internal function used by `find-esetkey-links'."
+ (let* ((cmd-at-pt (ee-command-at-point))
+ (prompt (if cmd-at-pt
+ (format "Command (default %s): " cmd-at-pt)
+ "Command: ")))
+ (read-command prompt cmd-at-pt)))
+
+(defun ee-command-at-point ()
+ "An internal function used by `find-esetkey-links'."
+ (let ((symbol (symbol-at-point)))
+ (if (commandp symbol) symbol)))
+
diff --git a/eev-testblocks.el b/eev-testblocks.el
index cff3d9c..8354d89 100644
--- a/eev-testblocks.el
+++ b/eev-testblocks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 2020oct10
+;; Version: 2020dec16
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-testblocks.el>
@@ -113,6 +113,18 @@ dofile \"%s\"
--]]
" (buffer-name))))
+(defun ee-insert-test-org-mode ()
+ (interactive)
+ (insert "
+#+begin_comment
+ (eepitch-shell)
+ (eepitch-kill)
+ (eepitch-shell)
+
+#+end_comment
+
+"))
+
(defun ee-insert-test-python-mode ()
(interactive)
(insert (format "
diff --git a/eev-wrap.el b/eev-wrap.el
index d50a7f0..2ed4ec4 100644
--- a/eev-wrap.el
+++ b/eev-wrap.el
@@ -1,6 +1,6 @@
;;; eev-wrap.el --- wrap the current line into a hyperlink
-;; Copyright (C) 2013,2016,2017,2019 Free Software Foundation, Inc.
+;; Copyright (C) 2013,2016,2017,2019,2020 Free Software Foundation, Inc.
;;
;; This file is part of GNU eev.
;;
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 2019sep28
+;; Version: 2020dec06
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-wrap.el>
@@ -93,6 +93,12 @@ The name of this function comes from the \"S\" in `(format
\"%S\" <obj>)'."
obj
(list 'quote obj)))
+(defalias 'ee-pp0 'ee-S)
+
+(defun ee-ppp0 (list) (concat "(" (mapconcat 'ee-pp0 list "\n ") ")\n"))
+
+
+
;; «ee-template0» (to ".ee-template0")
;; Moved to: (find-eev "eev-template0.el")
@@ -539,9 +545,6 @@ cd {dir}"))
;; (defalias 'ee-H 'ee-hyperlink-prefix)
;; (defalias 'ee-S 'ee-pp0)
-(defalias 'ee-pp0 'ee-S) ; compatibility
-
-
(provide 'eev-wrap)
- [elpa] externals/eev d73f329 04/20: Cleaned up and reorganized `find-youtubedl-links'., (continued)
- [elpa] externals/eev d73f329 04/20: Cleaned up and reorganized `find-youtubedl-links'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 121acfc 05/20: Added comments to `find-grep-links'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev df4c21f 07/20: Added support for `M-7 M-e'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 5496a57 09/20: Added the file `README.org'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 19bad3a 12/20: Rewrote the docs for `find-extra-file-links' (`M-e M-h')., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 01b2212 13/20: Rewrote `(find-anchors-intro)'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev f256747 14/20: Rewrote `find-man' completely to fix a long-standing bug., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 092ee70 16/20: Started rewriting `(find-videos-intro)'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 4386fbd 20/20: Merged eev with elpa/externals/eev., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 8dd8866 18/20: Added a section about `find-eevvideo-links' to `(find-audiovideo-intro)'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev da1aa60 08/20: Added `find-esetkey-links'.,
Stefan Monnier <=
- [elpa] externals/eev 93661a5 10/20: Renamed "README.md" to "README-old.md"., Stefan Monnier, 2021/01/04
- [elpa] externals/eev a898440 11/20: Changed `code-c-d' to make the w3m and tags links optional., Stefan Monnier, 2021/01/04
- [elpa] externals/eev e9a277a 17/20: Rewrote the beginning of `(find-videos-intro)'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 788aa0f 15/20: Fixed the behavior of `find-here-links' on `describe-package'., Stefan Monnier, 2021/01/04
- [elpa] externals/eev 82eafa4 19/20: Removed eev-pkg.el and rewrote the comments in eev.el., Stefan Monnier, 2021/01/04