[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/greader 40e0718 69/76: greader.el:
From: |
Stefan Monnier |
Subject: |
[elpa] externals/greader 40e0718 69/76: greader.el: |
Date: |
Fri, 8 Feb 2019 15:27:02 -0500 (EST) |
branch: externals/greader
commit 40e0718739fa72433059c3cf008c520bfeeeb683
Author: Michelangelo Rodriguez <address@hidden>
Commit: Michelangelo Rodriguez <address@hidden>
greader.el:
Added completion for greader-change-backend.
---
greader.el | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/greader.el b/greader.el
index 285ae82..8ca8e97 100644
--- a/greader.el
+++ b/greader.el
@@ -184,6 +184,13 @@ For example, if you specify a function that gets a
sentence, you should specify
(greader-toggle-timer))))
(greader-load-backends))
;;;code
+(defun greader--get-backends ()
+ "returns actual available back-ends, as a list of strings."
+ (let (b)
+ (dolist (greader-elem greader-backends nil)
+ (setq b (append b `(,(get greader-elem 'greader-backend-name)))))
+ b))
+
(defun greader-call-backend (command &optional arg)
(if arg
(funcall greader-actual-backend command arg)
@@ -192,12 +199,13 @@ For example, if you specify a function that gets a
sentence, you should specify
greader-backend-filename
(greader-call-backend 'executable))
(defvar greader-backend `(,greader-backend-filename))
+
(defun greader-change-backend (&optional backend)
"changes back-end. if backend is specified, it changes to backend, else it
cycles throwgh available back-ends."
(interactive
(list
(if current-prefix-arg
- (setq backend (read-from-minibuffer "backend: ")))))
+(completing-read"back-end:" (greader--get-backends)))))
(if (functionp backend)
(if (memq backend greader-backends)
(setq greader-actual-backend backend)
@@ -344,16 +352,16 @@ For example, if you specify a function that gets a
sentence, you should specify
(greader-read-asynchronous ". end")))))
(defun greader-set-reading-keymap ()
- (if (assoc 'greader minor-mode-map-alist)
+ (if (assoc 'greader-mode minor-mode-map-alist)
(progn
(setq minor-mode-map-alist (assq-delete-all 'greader
minor-mode-map-alist))
- (setq minor-mode-map-alist (push `(greader . ,greader-reading-map)
minor-mode-map-alist)))))
+ (setq minor-mode-map-alist (push `(greader-mode . ,greader-reading-map)
minor-mode-map-alist)))))
(defun greader-set-greader-keymap ()
- (if (assoc 'greader minor-mode-map-alist)
+ (if (assoc 'greader-mode minor-mode-map-alist)
(progn
(setq minor-mode-map-alist (assq-delete-all 'greader
minor-mode-map-alist))
- (setq minor-mode-map-alist (push `(greader . ,greader-map)
minor-mode-map-alist)))))
+ (setq minor-mode-map-alist (push `(greader-mode . ,greader-map)
minor-mode-map-alist)))))
(defun greader-stop ()
"stops reading of document."
- [elpa] externals/greader aeb49fe 58/76: greader-speechd.el:, (continued)
- [elpa] externals/greader aeb49fe 58/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 2d55a6f 63/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader c5bb54e 61/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 70128f8 59/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 38b08ee 65/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader a2c9a16 55/76: changed greader-set-rate to reflect new back-ends architecture., Stefan Monnier, 2019/02/08
- [elpa] externals/greader 6baaffe 64/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader f278f60 70/76: fixes, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 7d439f1 62/76: Patch from address@hidden applied, thanks!, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 149ae41 74/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader 40e0718 69/76: greader.el:,
Stefan Monnier <=
- [elpa] externals/greader 3af7992 49/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader 9dfba5b 72/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader 6141ff8 67/76: .gitignore, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 79f5df8 46/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 64893fa 60/76: README:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 441a370 76/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader 102e678 68/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader bbf1db6 71/76: premaring for merge, Stefan Monnier, 2019/02/08