all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.