mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 12:30:59 +01:00
+fixes
This commit is contained in:
35
.emacs
35
.emacs
@@ -1677,6 +1677,41 @@ might be bad."
|
|||||||
|
|
||||||
(defalias 'cb 'cleanup-buffer)
|
(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)
|
;; ** Better newline(s)
|
||||||
|
|
||||||
|
|||||||
1100
emacs.html
1100
emacs.html
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user