/[emacs]/emacs/lisp/sort.el
ViewVC logotype

Diff of /emacs/lisp/sort.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42 by karl, Thu Jan 9 23:28:25 2003 UTC revision 1.43 by lektu, Tue Feb 4 12:05:19 2003 UTC
# Line 97  same as ENDRECFUN." Line 97  same as ENDRECFUN."
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
# Line 108  same as ENDRECFUN." Line 108  same as ENDRECFUN."
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
# Line 205  same as ENDRECFUN." Line 205  same as ENDRECFUN."
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).
# Line 429  For example: to sort lines in the region Line 429  For example: to sort lines in the region
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))

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26