From: Reiner Steib <4uce.02.r.steib@gmx.net>
Subject: Re: Question about backup files
Date: Tue, 01 Oct 2002 17:06:15 +0200 [thread overview]
Message-ID: <v93crq42s8.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: mailman.1033479018.23093.help-gnu-emacs@gnu.org
On Tue, Oct 01 2002, Ben Key wrote:
> My question is, is it possible to create a more simplified
> keystroke assignment that implements the same behavior
> as `C-u C-u C-u C-x C-s'. For example, I would like to assign
> this behavior to 'ESC C-x C-s'.
First you have to find out what function is called by `C-x C-s':
,----[ C-h k C-x C-s ]
| C-x C-s runs the command save-buffer
| which is an interactive compiled Lisp function in `files'.
| It is bound to <f2>, C-x C-s, <menu-bar> <files> <save-buffer>.
| (save-buffer &optional ARGS)
|
| Save current buffer in visited file if modified. Versions described below.
| By default, makes the previous version into a backup file
| if previously requested or if this is the first save.
| With 1 C-u, marks this version
| to become a backup when the next save is done.
| With 2 C-u's,
| unconditionally makes the previous version into a backup file.
| With 3 C-u's, marks this version
| to become a backup when the next save is done,
| and unconditionally makes the previous version into a backup file.
|
| With argument of 0, never make the previous version into a backup file.
`----
"ESC C-x (translated from <escape> C-x) runs the command eval-defun"
so you should use a different key, e.g.:
(define-key global-map [(shift f5)]
'(lambda ()
(interactive)
(save-buffer 4))) ;; C-u ==> 4
(define-key global-map [(ctrl f5)]
'(lambda ()
(interactive)
(save-buffer (* 4 4)))) ;; C-u C-u ==> 4*4
(define-key global-map [(shift ctrl f5)]
'(lambda ()
(interactive)
(save-buffer (* 4 4 4)))) ;; C-u C-u C-u ==> 4*4*4
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
next parent reply other threads:[~2002-10-01 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1033479018.23093.help-gnu-emacs@gnu.org>
2002-10-01 15:06 ` Reiner Steib [this message]
2002-10-01 15:55 ` Question about backup files Kevin Rodgers
2002-10-01 17:07 Bingham, Jay
-- strict thread matches above, loose matches on Subject: below --
2002-10-01 13:16 Ben Key
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v93crq42s8.fsf@marauder.physik.uni-ulm.de \
--to=4uce.02.r.steib@gmx.net \
--cc=reiner.steib@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).