This commit is contained in:
Thomas von Dein
2018-02-14 04:39:56 +01:00
parent 40117de870
commit 5d4d961b0d
2 changed files with 610 additions and 525 deletions

35
.emacs
View File

@@ -1677,6 +1677,41 @@ might be bad."
(defalias 'cb 'cleanup-buffer)
;; --------------------------------------------------------------------------------
;; ** Remove Umlauts and other crab in current buffer
;; converts:
;; Stan Lem - ein schönes Leben & sonst nix(ungekuerzte Ausgabe)
;; to:
;; Stan_Lem-ein_schoenes_Leben_sonst_nix_ungekuerzte_Ausgabe
;;
;; used in dired buffers to cleanup filenames by german windows users.
(defun umlaute-weg()
(interactive)
(let ((umlaute '((Ü . Ue)
(Ä . Ae)
(Ö . Oe)
(ü . ue)
(ä . ae)
(ö . oe)
(ß . ss)))
(regs (list
'(" " . "_")
'("_-_" . "-")
'("[\(\)&]" . "_")
'("__*" . "_")
'("_$" . "")
)))
(save-excursion
(dolist (pair umlaute)
(replace-regexp (symbol-name (car pair))
(symbol-name (cdr pair))
nil
(point-min) (point-max)))
(dolist (reg regs)
(replace-regexp (car reg) (cdr reg) nil
(point-min) (point-max))))))
;; --------------------------------------------------------------------------------
;; ** Better newline(s)

1100
emacs.html

File diff suppressed because it is too large Load Diff