unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* function def && eval exp.
@ 2005-07-31  5:29 Baloff
  0 siblings, 0 replies; only message in thread
From: Baloff @ 2005-07-31  5:29 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-31  5:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-31  5:29 function def && eval exp Baloff

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).