I haven't used this in over a decade, and who knows if the encoding
would even still work on a copy-paste from a modern Word document.
I can't even open one.
(load-library "diff-buffer-against-file")
(global-set-key "\C-cd" 'diff-buffer-against-file)
-(load-library "fix-nonstandard-chars")
(load-library "latex-query-replace-regexp-math")
+++ /dev/null
-(defun fix-nonstandard-chars (context)
- "Replace some typical nonstandard characters that result from
- copy-and-pasting word processor text into XHTML documents."
-
- (interactive "p")
-
- (setq replacements
- '( ("’" "'")
- ("“" "“")
- ("”" "”")
- ("–" "-")
- ("—" "—")
- ("°" "°")
- ("®" "®")
- ("™" "™")
- )
- )
-
- (dolist (replacement replacements nil)
- ;; The mark gets all fucked up here. It's easiest to
- ;; just return to the beginning of the buffer each time.
- (beginning-of-buffer)
- (replace-string (nth 0 replacement) (nth 1 replacement))
- )
-)