Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • You already have "EMACS=t" in the environment, so you don't need an extra variable to do that.

    If you want to temporarily get rid of that, setenv does a lot more than you need, including pushing your temp changes into setenv-history. Look at localizing the process-environment variable, and simply modifying it to a new value. For example (slightly untested):

    (let ((process-environment (cons "FOO=bar" process-environment)))
      ... your code ...
    • Randal L. Schwartz
    • Stonehenge
    • You already have "EMACS=t" in the environment,

      I don't see that when I shell-command "printenv" or do (getenv "EMACS"). Are you using Xemacs? I'm using GNU Emacs 21.3.1.

      That's a handy trick with localizing process-environment tho!

      • EMACS=t is apparently only when I start a shell. Must be a function of shell mode. (Time passes.) Oh, it's defined in comint-exec-1. There's a good example of manipulating a local process-environment there too! Bonus!
        • Randal L. Schwartz
        • Stonehenge