mirror of https://github.com/djcb/mu.git
* mu4e-utils: fixes for mu4e-read-option
This commit is contained in:
parent
6b4ced1f4f
commit
2fd793746c
|
@ -97,14 +97,15 @@ Function returns the CHAR typed."
|
|||
"[" (propertize (make-string 1 kar) 'face 'mu4e-view-link-face) "]"
|
||||
descr))) options ", "))
|
||||
(inhibit-quit nil) ;; allow C-g from read-char, not sure why this is needed
|
||||
(response
|
||||
(ignore-errors
|
||||
(read-char
|
||||
(okchar)
|
||||
(response))
|
||||
(while (not okchar)
|
||||
(message nil) ;; we need to clear the echo area first... why?!
|
||||
(setq response
|
||||
(read-char-exclusive
|
||||
(concat prompt optionsstr
|
||||
" [" (propertize "C-g" 'face 'highlight) " to quit]")))))
|
||||
;; if the input is not one of the options, try again
|
||||
(unless (member response optionkars) (mu4e-read-option prompt options))
|
||||
;; otherwise, return the response char
|
||||
" [" (propertize "C-g" 'face 'highlight) " to quit]")))
|
||||
(setq okchar (member response optionkars)))
|
||||
response))
|
||||
|
||||
|
||||
|
@ -406,18 +407,14 @@ process."
|
|||
((plist-get info :message) (message "%s" (plist-get info :message))))))
|
||||
|
||||
|
||||
(defun mu4e-error-handler (err)
|
||||
(defun mu4e-error-handler (errcode errmsg)
|
||||
"Handler function for showing an error."
|
||||
(let ((errcode (plist-get err :error))
|
||||
(errmsg (plist-get err :error-message)))
|
||||
(case errcode
|
||||
(4 (message "No matches for this search query."))
|
||||
(t (message (format "Error %d: %s" errcode errmsg))))))
|
||||
(t (message (format "Error %d: %s" errcode errmsg)))))
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(defvar mu4e-update-timer nil
|
||||
|
|
Loading…
Reference in New Issue