emacs-devel
[Top][All Lists]
Advanced

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

Inaccurate paragraph in (info "(elisp)Terminal-Specific")


From: Daniel Brockman
Subject: Inaccurate paragraph in (info "(elisp)Terminal-Specific")
Date: Sat, 13 May 2006 04:46:28 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.51 (gnu/linux)

>From (info "(elisp)Terminal-Specific"):

   When the name of the terminal type contains a hyphen,
   only the part of the name before the first hyphen is
   significant in choosing the library name.  Thus, terminal
   types `aaa-48' and `aaa-30-rv' both use the
   `term/aaa' library.  If necessary, the library can
   evaluate `(getenv "TERM")' to find the full name of the
   terminal type.

The code actually looks like this:

    (while (and term
                (not (load (concat term-file-prefix term) t t)))
      ;; Strip off last hyphen and what follows, then try again
      (setq term
            (if (setq hyphend (string-match "[-_][^-_]+\\'" term))
                (substring term 0 hyphend)
              nil)))

So it is inaccurate to say that ``only the part of the name
before the first hyphen is significant.''

I suggest the following text:

   When no matching library is found and the name of the
   terminal type contains a hyphen, the last hyphen and
   everything that follows is stripped from the terminal
   type name and another attempt is made.  This process is
   continued recursively until a matching library is found,
   or there are no more hyphens in the name.  For example,
   the terminal types `aaa-48' and `aaa-30-rv' both use the
   `term/aaa' library.  (If necessary, the library can
   evaluate `(getenv "TERM")' to find the full name of the
   terminal type.)


-- 
Daniel Brockman <address@hidden>

   ``For any given feature, I don't care much about the
     people who find it useless --- I care more about
     the people who find it useful.'' --- Larry Wall





reply via email to

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