97 |
((consp (car (car sort-lists))) |
((consp (car (car sort-lists))) |
98 |
(function |
(function |
99 |
(lambda (a b) |
(lambda (a b) |
100 |
(> 0 (compare-buffer-substrings |
(> 0 (compare-buffer-substrings |
101 |
nil (car a) (cdr a) |
nil (car a) (cdr a) |
102 |
nil (car b) (cdr b)))))) |
nil (car b) (cdr b)))))) |
103 |
(t |
(t |
108 |
((consp (car (car sort-lists))) |
((consp (car (car sort-lists))) |
109 |
(function |
(function |
110 |
(lambda (a b) |
(lambda (a b) |
111 |
(> 0 (compare-buffer-substrings |
(> 0 (compare-buffer-substrings |
112 |
nil (car (car a)) (cdr (car a)) |
nil (car (car a)) (cdr (car a)) |
113 |
nil (car (car b)) (cdr (car b))))))) |
nil (car (car b)) (cdr (car b))))))) |
114 |
(t |
(t |
205 |
(delete-region min (1+ min)))))) |
(delete-region min (1+ min)))))) |
206 |
|
|
207 |
;;;###autoload |
;;;###autoload |
208 |
(defun sort-lines (reverse beg end) |
(defun sort-lines (reverse beg end) |
209 |
"Sort lines in region alphabetically; argument means descending order. |
"Sort lines in region alphabetically; argument means descending order. |
210 |
Called from a program, there are three arguments: |
Called from a program, there are three arguments: |
211 |
REVERSE (non-nil means reverse order), BEG and END (region to sort). |
REVERSE (non-nil means reverse order), BEG and END (region to sort). |
429 |
;; using negative prefix arg to mean "reverse" is now inconsistent with |
;; using negative prefix arg to mean "reverse" is now inconsistent with |
430 |
;; other sort-.*fields functions but then again this was before, since it |
;; other sort-.*fields functions but then again this was before, since it |
431 |
;; didn't use the magnitude of the arg to specify anything. |
;; didn't use the magnitude of the arg to specify anything. |
432 |
(interactive "P\nsRegexp specifying records to sort: |
(interactive "P\nsRegexp specifying records to sort: |
433 |
sRegexp specifying key within record: \nr") |
sRegexp specifying key within record: \nr") |
434 |
(cond ((or (equal key-regexp "") (equal key-regexp "\\&")) |
(cond ((or (equal key-regexp "") (equal key-regexp "\\&")) |
435 |
(setq key-regexp 0)) |
(setq key-regexp 0)) |