diff options
| author | Eli Zaretskii | 2008-05-03 10:28:39 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-05-03 10:28:39 +0000 |
| commit | a43e305413e3cce45496bcbfa6845b7fd6c206cc (patch) | |
| tree | 989c086d6353bed13918ceb38e62f4cc26b500af | |
| parent | 17f039f312eba0f304a33abd7890328a02417fd4 (diff) | |
| download | emacs-a43e305413e3cce45496bcbfa6845b7fd6c206cc.tar.gz emacs-a43e305413e3cce45496bcbfa6845b7fd6c206cc.zip | |
(ls-lisp-insert-directory): Use `string-width' instead of `length'
for comparing length of user and group names.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/ls-lisp.el | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84d1f3e5833..8e0828a09cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-05-03 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * ls-lisp.el (ls-lisp-insert-directory): Use `string-width' | ||
| 4 | instead of `length' for comparing length of user and group names. | ||
| 5 | |||
| 1 | 2008-05-03 Eric S. Raymond <esr@snark.thyrsus.com> | 6 | 2008-05-03 Eric S. Raymond <esr@snark.thyrsus.com> |
| 2 | 7 | ||
| 3 | * vc-dispatcher.el: New file, separates out the UI and command | 8 | * vc-dispatcher.el: New file, separates out the UI and command |
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index f1a05a6f8c8..4f13a023ab8 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el | |||
| @@ -329,9 +329,11 @@ not contain `d', so that a full listing is expected." | |||
| 329 | (dolist (elt file-alist) | 329 | (dolist (elt file-alist) |
| 330 | (setq attr (cdr elt) | 330 | (setq attr (cdr elt) |
| 331 | fuid (nth 2 attr) | 331 | fuid (nth 2 attr) |
| 332 | uid-len (length (if (stringp fuid) fuid (format "%d" fuid))) | 332 | uid-len (if (stringp fuid) (string-width fuid) |
| 333 | (length (format "%d" fuid))) | ||
| 333 | fgid (nth 3 attr) | 334 | fgid (nth 3 attr) |
| 334 | gid-len (length (if (stringp fgid) fgid (format "%d" fgid))) | 335 | gid-len (if (stringp fgid) (string-width fgid) |
| 336 | (length (format "%d" fgid))) | ||
| 335 | file-size (nth 7 attr)) | 337 | file-size (nth 7 attr)) |
| 336 | (if (> uid-len max-uid-len) | 338 | (if (> uid-len max-uid-len) |
| 337 | (setq max-uid-len uid-len)) | 339 | (setq max-uid-len uid-len)) |