From: Baloff <washdc@wash.edu>
Subject: function def && eval exp.
Date: 31 Jul 2005 15:29:26 +1000 [thread overview]
Message-ID: <87y87nh7bd.fsf@wash.edu> (raw)
Hello
using the shell in emacs
$ls -l
-rw-r--r-- 1 sam sam 319 Jul 31 13:00 ^[[0mmain.cpp^[[0m
to remove those strange character around the filename I
M-: (ansi-color-apply-on-region (point-min) (point-max))
I have currently in my .emacs this function which removes
all the ^M from text which get infested with it.
(global-set-key [f5] 'cut-ctrlM) ; cut all ^M.
(defun cut-ctrlM ()
"Cut all visible ^M."
(interactive)
(beginning-of-buffer)
(while (search-forward "\r" nil t)
(replace-match "" nil t))
)
how can I do both, eval the expression and run the function by the [f5]key.
thanks
reply other threads:[~2005-07-31 5:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87y87nh7bd.fsf@wash.edu \
--to=washdc@wash.edu \
/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).