emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in ls-lisp.el (was: Sorting of directories in dired)


From: Drew Adams
Subject: bug in ls-lisp.el (was: Sorting of directories in dired)
Date: Fri, 8 Jul 2005 11:13:52 -0700

    Could those who are interested in Windows please discuss this
    among themselves, not here?

Forget about the general discussion - I reported a bug in `ls-lisp.el',
which is why I cc'd emacs-pretest. The bug report may have gotten lost in
the thread. Here it is:

The commented-out line here, testing the Windows platform, should not be
commented-out:

(defcustom ls-lisp-emulation
  (cond ((eq system-type 'macos) 'MacOS)
        ;; ((eq system-type 'windows-nt) 'MS-Windows)
        ((memq system-type
               '(hpux dgux usg-unix-v unisoft-unix rtu irix berkeley-unix))
         'UNIX))                        ; very similar to GNU
  ;; Anything else defaults to nil, meaning GNU.
  ...)

Reason: This code adapts the behavior to the platform, and it mistakenly
gives the default "GNU" behavior (cond returns nil if no clause matches) to
Emacs on Windows. This has the consequence that the following user options
have faulty values (for the Windows platform):

 - ls-lisp-ignore-case
 - ls-lisp-verbosity

These two variables also have defcustoms that adapt their values to the
current platform. They specifically test for the Windows platform, but they
do so by checking `ls-lisp-emulation', __which cannot ever have the value
`MS-Windows'__ when these defcustoms are evaluated - their tests for Windows
are useless. Why? Because `ls-lisp.el' is preloaded, and the defcustom of
`ls-lisp-emulation' sets it to nil (on Windows), not to `MS-Windows'. That
is the bug.

It does no good for a user on Windows to simply change `ls-lisp-emulation'
himself, to override its defcustom. He must also change
`ls-lisp-ignore-case' and `ls-lisp-verbosity' - which makes
`ls-lisp-emulation' completely ineffectual as a user option (on Windows).
The defcustom of `ls-lisp-emulation' treats Windows as the default case
(nil), but the other user options try to treat Windows specially - they
don't succeed because they depend on `ls-lisp-emulation' to play along - at
(pre)load time.

The bug concerns only the Windows platform; other platforms do not manifest
the bug, and they won't be affected by fixing it.

Thanks.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]