From c8ef0ff3bd4f0b1ddaaadf9770d64db7fe28159a Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 2 Feb 2010 15:30:45 -0500 Subject: [PATCH] Added a new function, fix-nonstandard-chars. --- .emacs | 2 ++ fix-nonstandard-chars.el | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 fix-nonstandard-chars.el 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 "–" "-") +) -- 2.43.2