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.
[...]
> [EMAIL PROTECTED]
> +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/
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel