emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggested addition to custom.texi


From: Reiner Steib
Subject: Re: Suggested addition to custom.texi
Date: Fri, 20 May 2005 20:00:34 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

On Sat, Apr 16 2005, Stefan Monnier wrote:

> How about the patch below?

There has been no objection (withing several weeks), AFAICS.  I like
Stefan's suggestion.

[...]
> address@hidden
> +Adjusting the configuration to various contexts.
> +
> +In most of the cases, people want their Emacs to behave the same on
> +all their machines, so their configuration should be the same, no
> +matter whether it's GNU/Linux or not, under X11 or on a tty, with one
> +version of  Emacs or another, ...
> +
> +What can happen, tho, is that depending on the circumstance some
> +features may or may not be available.  In that case just prepend each
> +such customization with a little test that ensures that the feature
> +can be used.  The best tests are usually checking that the feature is
> +available, rather than checking what kind of environment is
> +being used.
[... examples ...]

Here are some examples from my init files which you may want to
include.

Possible example for w/ or w/o X11:

(setq ps-lpr-command
      (cond ((and (eq window-system 'x) (executable-find "xpp"))
             "xpp")
            ((executable-find "lpr")
             "lpr")))

;; Enable a couple of modes when available...
(dolist (mode '(column-number-mode line-number-mode
                minibuffer-electric-default-mode
                file-name-shadow-mode))
  (if (fboundp mode)
      (funcall mode 1)
    (message "Mode `%s' is not available" mode)))

Require library without error in case the library is not installed
everywhere:

(require 'xtla nil t)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

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