unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org
Subject: Re: New $TERM init code
Date: Fri, 29 Jul 2005 16:56:32 -0700	[thread overview]
Message-ID: <200507292356.j6TNuaKE025755@scanner2.ics.uci.edu> (raw)
In-Reply-To: jwv3bpxz8j2.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> writes:

    How 'bout the patch below which allows terminal-init-$TERM to be autoloaded
    and/or defined elsewhere than in term/$TERM.el (e.g. it can be defined in
    ~/.emacs, or a single term/foo.el can define both terminal-init-foo-bar and
    terminal-init-foo-baz, ...)?


            Stefan


    --- orig/lisp/startup.el
    +++ mod/lisp/startup.el
    @@ -1004,14 +1004,21 @@
                       (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))
    +              (if (setq hyphend (string-match "[-_][^-_]+\\'" term))
                       (substring term 0 hyphend)
                     nil)))
    -      (when term
    +      (setq term (getenv "TERM"))
    +      (while term

Wouldn't it be better to have this loop before the "load" loop? (1)
Or if it's after only loop if the "load" loop didn't find a terminal
file? 

Doing it the (1) way would DTRT for the multi-tty branch, it would
avoid loading the terminal file iff the corresponding terminal-init-
function is defined, which would happen after connecting the first
time from a terminal type.

  reply	other threads:[~2005-07-29 23:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-29 20:04 New $TERM init code Stefan Monnier
2005-07-29 23:56 ` Dan Nicolaescu [this message]
2005-09-12 15:51 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200507292356.j6TNuaKE025755@scanner2.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).