From: Michael Orlitzky Date: Tue, 2 Feb 2010 20:30:45 +0000 (-0500) Subject: Added a new function, fix-nonstandard-chars. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=emacs.d.git;a=commitdiff_plain;h=c8ef0ff3bd4f0b1ddaaadf9770d64db7fe28159a;hp=83f0c9d6b7078bc444ef02cb043f1be68399bbee Added a new function, fix-nonstandard-chars. --- diff --git a/.emacs b/.emacs index 87d2eb9..4732256 100644 --- a/.emacs +++ b/.emacs @@ -76,6 +76,8 @@ (load-library "diff-buffer-against-file") (global-set-key "\C-cd" 'diff-buffer-against-file) +(load-library "fix-nonstandard-chars") + ;; These next functions override the defaults provided by emacs. They ;; prevent warning messages related to file modification times, diff --git a/fix-nonstandard-chars.el b/fix-nonstandard-chars.el new file mode 100644 index 0000000..e5c3464 --- /dev/null +++ b/fix-nonstandard-chars.el @@ -0,0 +1,9 @@ +(defun fix-nonstandard-chars + "Replace some typical nonstandard characters that result from + copy-and-pasting word processor text into XHTML documents." + + (replace-string "’" "'") + (replace-string "“" "“") + (replace-string "”" "”") + (replace-string "–" "-") +)