emacs-devel
[Top][All Lists]
Advanced

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

Re: printing.el v6.6.2


From: Kai Großjohann
Subject: Re: printing.el v6.6.2
Date: Wed, 28 Nov 2001 17:53:06 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu)

Vinicius Jose Latorre <address@hidden> writes:

> The pr-temp-dir has the following setting:
>
> (defcustom pr-temp-dir
>   (pr-dosify-path
>    ;; hacked from `temporary-file-directory' variable in files.el
>    (file-name-as-directory
>     (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
>       (cond (ps-windows-system "c:/temp")
>             ((memq system-type '(vax-vms axp-vms)) "SYS$SCRATCH:")
>             (t "/tmp")
>             ))))
>   "*Specify a directory for temporary files during printing."
>   :type '(directory :tag "Temporary Directory")
>   :group 'printing)
>
> So, by default, pr-temp-dir and temporary-file-directory has the same value.

I think it is better to set it to 

    (if (boundp 'temporary-file-directory)
        temporary-file-directory
      (SOME-OTHER-CODE-HERE))

This seems cleaner -- if the temporary-file-directory logic is
improved, your code will profit from it.  If the user changes
temporary-file-directory, your code will use the new directory
automatically.

You can use (symbol-value 'temporary-file-directory) to avoid the
byte-compiler warning, if you want that.

What do you think?

kai
-- 
Simplification good!  Oversimplification bad!  (Larry Wall)



reply via email to

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