[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Easy/Possible to globally change prompt strings of messages? e.g. ch
From: |
Drew Adams |
Subject: |
RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ? |
Date: |
Thu, 29 Jan 2015 20:19:58 -0800 (PST) |
> Is it easy/possible to change the prompt strings of various Emacs commands?
>
> For example, what Emacs calls find-file I think of as "opening a file"
> and hence would like to change the prompt from "Find file:" to "open file:".
>
> Are global changes like that possible/easy? Perhaps it would require
> an Lisp style macro or something?
Generally speaking, no. Typically, a general function that reads
input is called by a command, and it is passed a literal string as
the prompt to use.
Anything is possible, of course. You can replace, for example, the
standard definition of `find-file-read-args' (which reads the file
name for `find-file' and similar commands), so that it uses your
preferred prompt.
But there is a reason that such functions take a PROMPT argument:
so that they can be called by different commands or in different
contexts, using different prompts. For `find-file-read-args',
for example:
files.el:1433: (find-file-read-args "Find file: "
files.el:1453: (find-file-read-args "Find file in other window: "
files.el:1476: (find-file-read-args "Find file in other frame: "
files.el:1490: (interactive (nbutlast (find-file-read-args "Find existing
file: " t)))
files.el:1513: (find-file-read-args "Find file read-only: "
files.el:1522: (find-file-read-args "Find file read-only other window: "
files.el:1531: (find-file-read-args "Find file read-only other frame: "
menu-bar.el:206: (filename (car (find-file-read-args "Find file: "
mustmatch))))
files.el:1433: (find-file-read-args "Find file: "
files.el:1453: (find-file-read-args "Find file in other window: "
files.el:1476: (find-file-read-args "Find file in other frame: "
files.el:1490: (interactive (nbutlast (find-file-read-args "Find existing
file: " t)))
files.el:1513: (find-file-read-args "Find file read-only: "
files.el:1522: (find-file-read-args "Find file read-only other window: "
files.el:1531: (find-file-read-args "Find file read-only other frame: "
menu-bar.el:206: (filename (car (find-file-read-args "Find file: "
mustmatch))))
Alternatively, you could replace not the utility functions that read
input but the commands that call the utility functions. In that case,
you would have even more to change. ;-)
In sum, don't bother to try. Just learn to live with "Find file" etc.
- Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Chris Seberino, 2015/01/29
- RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?,
Drew Adams <=
- RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Drew Adams, 2015/01/30
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Christian Seberino, 2015/01/30
- RE: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Drew Adams, 2015/01/30
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Christian Seberino, 2015/01/30
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Christian Seberino, 2015/01/30
- Message not available
- Re: Easy/Possible to globally change prompt strings of messages? e.g. changing find-file's prompt string from "Find file:" to "open file:" ?, Chris Seberino, 2015/01/30