Mercurial > emacs
changeset 5418:6eb86cda3856
(sort-float-fields): Commented out.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 03 Jan 1994 04:15:18 +0000 |
parents | 4d74f3f4ed03 |
children | a35739cc2026 |
files | lisp/sort.el |
diffstat | 1 files changed, 21 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/sort.el Sun Jan 02 21:51:47 1994 +0000 +++ b/lisp/sort.el Mon Jan 03 04:15:18 1994 +0000 @@ -248,8 +248,7 @@ Specified field must contain a number in each line of the region. With a negative arg, sorts by the ARGth field counted from the right. Called from a program, there are three arguments: -FIELD, BEG and END. BEG and END specify region to sort. -If you want to sort floating-point numbers, try `sort-float-fields'." +FIELD, BEG and END. BEG and END specify region to sort." (interactive "p\nr") (sort-fields-1 field beg end (function (lambda () @@ -264,26 +263,26 @@ (point)))))) nil)) -;;;###autoload -(defun sort-float-fields (field beg end) - "Sort lines in region numerically by the ARGth field of each line. -Fields are separated by whitespace and numbered from 1 up. Specified field -must contain a floating point number in each line of the region. With a -negative arg, sorts by the ARGth field counted from the right. Called from a -program, there are three arguments: FIELD, BEG and END. BEG and END specify -region to sort." - (interactive "p\nr") - (sort-fields-1 field beg end - (function (lambda () - (sort-skip-fields field) - (string-to-number - (buffer-substring - (point) - (save-excursion - (re-search-forward - "[+-]?[0-9]*\.?[0-9]*\\([eE][+-]?[0-9]+\\)?") - (point)))))) - nil)) +;;;;;###autoload +;;(defun sort-float-fields (field beg end) +;; "Sort lines in region numerically by the ARGth field of each line. +;;Fields are separated by whitespace and numbered from 1 up. Specified field +;;must contain a floating point number in each line of the region. With a +;;negative arg, sorts by the ARGth field counted from the right. Called from a +;;program, there are three arguments: FIELD, BEG and END. BEG and END specify +;;region to sort." +;; (interactive "p\nr") +;; (sort-fields-1 field beg end +;; (function (lambda () +;; (sort-skip-fields field) +;; (string-to-number +;; (buffer-substring +;; (point) +;; (save-excursion +;; (re-search-forward +;; "[+-]?[0-9]*\.?[0-9]*\\([eE][+-]?[0-9]+\\)?") +;; (point)))))) +;; nil)) ;;;###autoload (defun sort-fields (field beg end)