emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 9/9] Detect window-system from display name


From: Daniel Colascione
Subject: Re: [PATCH 9/9] Detect window-system from display name
Date: Tue, 07 Aug 2012 10:09:53 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0

On 8/7/12 8:50 AM, Stefan Monnier wrote:
>> +(defvar display-format-alist nil
>> +  "Alist of patterns to decode display names.
>> +The car of each entry is a regular expression matching a display
>> +name string.  The cdr is a symbol giving the window-system that
>> +handles the corresponding kind of display.")
> [...]
>> +(add-to-list 'display-format-alist '("\\`ns\\'" . ns))
> [...]
>> +(add-to-list 'display-format-alist '("\\`windows\\'" . w32))
> [...]
>> +(add-to-list 'display-format-alist '("\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" . 
>> x))
> 
> Better just put all three entries directly in the defvar.

But then the code that defvars the variable needs to know about all
the window systems we might use. It seems cleaner to have the
window-system-specific code add the window-system-specific alist entries.


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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