Emacs: Fix locale to C when sorting in sort-lines-unique

master
Pierre Neidhardt 2014-10-22 00:23:41 +02:00
parent 7ad503c69e
commit 7d3708f63b
1 changed files with 4 additions and 1 deletions

View File

@ -437,7 +437,10 @@ Hook function for skeletons."
(defun sort-lines-unique ()
"Remove duplicate lines using shell command `sort -u'."
(interactive)
(call-process-region (point) (mark) "sort" t t nil "-u"))
(let ((lcall (getenv "LC_ALL")))
(setenv "LC_ALL" "C")
(call-process-region (point) (mark) "sort" t t nil "-u")
(setenv "LC_ALL" lcall)))
(defun swap-windows ()
"If you have 2 windows, it swaps them."