eric@nosun.west.sun.com (Eric Hanchrow) (02/08/90)
GNU Emacs 18.55. In `sort.el' (sort-numeric-fields), I see (function (lambda () (sort-skip-fields (1- field)) (string-to-int (buffer-substring (point) (save-excursion (skip-chars-forward "[0-9]") (point)))))) It appears that the `skip-chars-forward' implicitly defines the regular expression which determines what constitues a number. It would be nice if this were more general: If perhaps there were a variable `sort-number-regexp' or something. What brought this to my attention was the fact that sorting fields which contained negative numbers didn't work. I changed the line to (skip-chars-forward "-[0-9]") and it works fine. ------------------------------------------------------------------------- |Eric Hanchrow yamada-sun!eric@nosun.west.sun.com | |Phase III Logic, Inc. ...!{tektronix, sun}!nosun!yamada-sun!eric | |1600 N.W. 167th Place Beaverton, OR 97006 | |Voice: (503)-645-0313 Fax: (503)-645-0207 as of 13-Dec-89 | -------------------------------------------------------------------------