emacs-devel
[Top][All Lists]
Advanced

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

Re: compile mode and $EMACS


From: Andreas Schwab
Subject: Re: compile mode and $EMACS
Date: Sun, 11 Aug 2013 15:06:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Sebastian Wiesner <address@hidden> writes:

> Which ones?  Can you name *concrete* examples?

bash:
  /*
   * M-x term -> TERM=eterm EMACS=22.1 (term:0.96)      (eterm)
   * M-x shell -> TERM=dumb EMACS=t                     (no line editing)
   * M-x terminal -> TERM=emacs-em7955 EMACS=           (line editing)
   */
  if (interactive_shell)
    {
      char *term, *emacs;

      term = get_string_value ("TERM");
      emacs = get_string_value ("EMACS");

      /* Not sure any emacs terminal emulator sets TERM=emacs any more */
      no_line_editing |= term && (STREQ (term, "emacs"));
      no_line_editing |= emacs && emacs[0] == 't' && emacs[1] == '\0' && STREQ 
(term, "dumb");

      /* running_under_emacs == 2 for `eterm' */
      running_under_emacs = (emacs != 0) || (term && STREQN (term, "emacs", 5));
      running_under_emacs += term && STREQN (term, "eterm", 5) && emacs && 
strstr (emacs, "term");

      if (running_under_emacs)
        gnu_error_format = 1;
    }

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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