Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Alter language prompts.

Instead of providing an already filled-in language for from-suggest and
to-suggest, place the default in the prompt and allow the user to either
hit return to accept it or enter the desired language using completing-read.
  • Loading branch information...
1 parent de078b3 commit 0a3d637bdb37a895b9f4383e0c8fefcc619e4521 @bon bon committed with
Showing with 9 additions and 6 deletions.
  1. +9 −6 babel.el
15 babel.el
@@ -396,10 +396,11 @@ automatically displayed."
(if accept-default-setup
- (completing-read "Translate from: "
+ (completing-read (format "Translate from (%s): " from-suggest)
babel-languages nil t
- (cons from-suggest 0)
- 'babel-from-history)))
+ nil
+ 'babel-from-history
+ from-suggest)))
(to-avail (remove* from-long babel-languages
:test #'(lambda (a b) (string= a (car b)))))
(to-suggest (or (first
@@ -409,9 +410,11 @@ automatically displayed."
(if accept-default-setup
- (completing-read "Translate to: " to-avail nil t
- (cons to-suggest 0)
- 'babel-to-history)))
+ (completing-read (format "Translate to (%s): " to-suggest)
+ to-avail nil t
+ nil
+ 'babel-to-history
+ to-suggest)))
(from (cdr (assoc from-long babel-languages)))
(to (cdr (assoc to-long babel-languages)))
(backends (babel-get-backends from to)))

0 comments on commit 0a3d637

Please sign in to comment.
Something went wrong with that request. Please try again.