* add compatibilty wrapper for emacs24's read-char-choice
This commit is contained in:
@ -182,6 +182,7 @@ The server output is as follows:
|
||||
(mu4e-log 'misc "* Received %d byte(s)" (length str))
|
||||
(setq mu4e~proc-buf (concat mu4e~proc-buf str)) ;; update our buffer
|
||||
(let ((sexp (mu4e~proc-eat-sexp-from-buf)))
|
||||
(with-local-quit
|
||||
(while sexp
|
||||
(mu4e-log 'from-server "%S" sexp)
|
||||
(cond
|
||||
@ -247,7 +248,7 @@ The server output is as follows:
|
||||
|
||||
(t (mu4e-message "Unexpected data from server [%S]" sexp)))
|
||||
|
||||
(setq sexp (mu4e~proc-eat-sexp-from-buf)))))
|
||||
(setq sexp (mu4e~proc-eat-sexp-from-buf))))))
|
||||
|
||||
|
||||
;; error codes are defined in src/mu-util.h
|
||||
|
||||
@ -91,14 +91,12 @@ dir already existed, or has been created, nil otherwise."
|
||||
(defun mu4e~read-char-choice (prompt choices)
|
||||
"Compatiblity wrapper for `read-char-choice', which is emacs-24
|
||||
only."
|
||||
(if (fboundp 'read-char-choice)
|
||||
(read-char-choice prompt choices)
|
||||
(let ((choice) (ok))
|
||||
(let ((choice) (ok) (inhibit-quit nil))
|
||||
(while (not ok)
|
||||
(message nil);; this seems needed...
|
||||
(setq choice (read-char prompt))
|
||||
(setq choice (read-char-exclusive prompt))
|
||||
(setq ok (member choice choices)))
|
||||
choice)))
|
||||
choice))
|
||||
|
||||
(defun mu4e-read-option (prompt options)
|
||||
"Ask user for an option from a list on the input area. PROMPT
|
||||
|
||||
Reference in New Issue
Block a user