-File: xemacs-faq.info, Node: Customization, Next: Subsystems, Prev: Installation, Up: Top
-
-3 Customization and Options
-***************************
-
- This is part 3 of the XEmacs Frequently Asked Questions list. This
-section is devoted to Customization and screen settings.
-
-* Menu:
-
-Customization--Emacs Lisp and `.emacs':
-* Q3.0.1:: What version of Emacs am I running?
-* Q3.0.2:: How do I evaluate Elisp expressions?
-* Q3.0.3:: `(setq tab-width 6)' behaves oddly.
-* Q3.0.4:: How can I add directories to the `load-path'?
-* Q3.0.5:: How to check if a lisp function is defined?
-* Q3.0.6:: Can I force the output of `(face-list)' to a buffer?
-* Q3.0.7:: Font selections don't get saved after `Save Options'.
-* Q3.0.8:: How do I make a single minibuffer frame?
-* Q3.0.9:: What is `Customize'?
-
-X Window System & Resources:
-* Q3.1.1:: Where is a list of X resources?
-* Q3.1.2:: How can I detect a color display?
-* Q3.1.3:: `(set-screen-width)' worked in 19.6, but not in 19.13?
-* Q3.1.4:: Specifying `Emacs*EmacsScreen.geometry' in `.emacs' does not work in 19.15?
-* Q3.1.5:: How can I get the icon to just say `XEmacs'?
-* Q3.1.6:: How can I have the window title area display the full path?
-* Q3.1.7:: `xemacs -name junk' doesn't work?
-* Q3.1.8:: `-iconic' doesn't work.
-
-Textual Fonts & Colors:
-* Q3.2.1:: How can I set color options from `.emacs'?
-* Q3.2.2:: How do I set the text, menu and modeline fonts?
-* Q3.2.3:: How can I set the colors when highlighting a region?
-* Q3.2.4:: How can I limit color map usage?
-* Q3.2.5:: My tty supports color, but XEmacs doesn't use them.
-* Q3.2.6:: Can I have pixmap backgrounds in XEmacs?
-
-The Modeline:
-* Q3.3.1:: How can I make the modeline go away?
-* Q3.3.2:: How do you have XEmacs display the line number in the modeline?
-* Q3.3.3:: How do I get XEmacs to put the time of day on the modeline?
-* Q3.3.4:: How do I turn off current chapter from AUC TeX modeline?
-* Q3.3.5:: How can one change the modeline color based on the mode used?
-
-3.4 Multiple Device Support:
-* Q3.4.1:: How do I open a frame on another screen of my multi-headed display?
-* Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
-
-3.5 The Keyboard:
-* Q3.5.1:: How can I bind complex functions (or macros) to keys?
-* Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
-* Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down?
-* Q3.5.4:: Globally binding `Delete'?
-* Q3.5.5:: Scrolling one line at a time.
-* Q3.5.6:: How to map `Help' key alone on Sun type4 keyboard?
-* Q3.5.7:: How can you type in special characters in XEmacs?
-* Q3.5.8:: Why does `(global-set-key [delete-forward] 'delete-char)' complain?
-* Q3.5.9:: How do I make the Delete key delete forward?
-* Q3.5.10:: Can I turn on "sticky" modifier keys?
-* Q3.5.11:: How do I map the arrow keys?
-
-The Cursor:
-* Q3.6.1:: Is there a way to make the bar cursor thicker?
-* Q3.6.2:: Is there a way to get back the old block cursor where the cursor covers the character in front of the point?
-* Q3.6.3:: Can I make the cursor blink?
-
-The Mouse and Highlighting:
-* Q3.7.1:: How can I turn off Mouse pasting?
-* Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons?
-* Q3.7.3:: Clicking the left button does not do anything in buffer list.
-* Q3.7.4:: How can I get a list of buffers when I hit mouse button 3?
-* Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool?
-* Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is?
-* Q3.7.7:: How do I select a rectangular region?
-* Q3.7.8:: Why does `M-w' take so long?
-
-The Menubar and Toolbar:
-* Q3.8.1:: How do I get rid of the menu (or menubar)?
-* Q3.8.2:: Can I customize the basic menubar?
-* Q3.8.3:: How do I control how many buffers are listed in the menu `Buffers' list?
-* Q3.8.4:: Resources like `Emacs*menubar*font' are not working?
-* Q3.8.5:: How can I bind a key to a function to toggle the toolbar?
-
-Scrollbars:
-* Q3.9.1:: How can I disable the scrollbar?
-* Q3.9.2:: How can one use resources to change scrollbar colors?
-* Q3.9.3:: Moving the scrollbar can move the point; can I disable this?
-* Q3.9.4:: How can I get automatic horizontal scrolling?
-
-Text Selections:
-* Q3.10.1:: How can I turn off or change highlighted selections?
-* Q3.10.2:: How do I get that typing on an active region removes it?
-* Q3.10.3:: Can I turn off the highlight during isearch?
-* Q3.10.4:: How do I turn off highlighting after `C-x C-p' (mark-page)?
-* Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Customization, Up: Customization
-
-3.0: Customization - Emacs Lisp and .emacs
-==========================================
-
-Q3.0.1: What version of Emacs am I running?
--------------------------------------------
-
- How can `.emacs' determine which of the family of Emacsen I am using?
-
- To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
-XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
-example given in `etc/sample.emacs'. There are other nifty things in
-there as well!
-
- For all new code, all you really need to do is:
-
- (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Customization
-
-Q3.0.2: How can I evaluate Emacs-Lisp expressions?
---------------------------------------------------
-
- I know I can evaluate Elisp expressions from `*scratch*' buffer with
-`C-j' after the expression. How do I do it from another buffer?
-
- Press `M-:' (the default binding of `eval-expression'), and enter
-the expression to the minibuffer. In XEmacs prior to 19.15
-`eval-expression' used to be a disabled command by default. If this is
-the case, upgrade your XEmacs.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Customization
-
-Q3.0.3: `(setq tab-width 6)' behaves oddly.
--------------------------------------------
-
- If you put `(setq tab-width 6)' in your `.emacs' file it does not
-work! Is there a reason for this? If you do it at the EVAL prompt it
-works fine!! How strange.
-
- Use `setq-default' instead, since `tab-width' is all-buffer-local.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization
-
-Q3.0.4: How can I add directories to the `load-path'?
------------------------------------------------------
-
- Here are two ways to do that, one that puts your directories at the
-front of the load-path, the other at the end:
-
- ;;; Add things at the beginning of the load-path, do not add
- ;;; duplicate directories:
- (pushnew "bar" load-path :test 'equal)
-
- (pushnew "foo" load-path :test 'equal)
-
- ;;; Add things at the end, unconditionally
- (setq load-path (nconc load-path '("foo" "bar")))
-
- keith (k.p.) hanlan <keithh@nortel.ca> writes:
-
- To add directories using Unix shell metacharacters use
- `expand-file-name' like this:
-
- (push (expand-file-name "~keithh/.emacsdir") load-path)
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization
-
-Q3.0.5: How to check if a lisp function is defined?
----------------------------------------------------
-
- Use the following elisp:
-
- (fboundp 'foo)
-
- It's almost always a mistake to test `emacs-version' or any similar
-variables.
-
- Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
-or even simple behavioral tests, eg.:
-
- (defvar foo-old-losing-code-p
- (condition-case nil (progn (losing-code t) nil)
- (wrong-number-of-arguments t)))
-
- There is an incredible amount of broken code out there which could
-work much better more often in more places if it did the above instead
-of trying to divine its environment from the value of one variable.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Customization
-
-Q3.0.6: Can I force the output of `(face-list)' to a buffer?
-------------------------------------------------------------
-
- It would be good having it in a buffer, as the output of
-`(face-list)' is too wide to fit to a minibuffer.
-
- Evaluate the expression in the `*scratch*' buffer with point after
-the rightmost paren and typing `C-j'.
-
- If the minibuffer smallness is the only problem you encounter, you
-can simply press `C-h l' to get the former minibuffer contents in a
-buffer.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Customization
-
-Q3.0.7: Font selections in don't get saved after `Save Options'.
-----------------------------------------------------------------
-
- For XEmacs 19.14 and previous:
-
- John Mann <mannj@ll.mit.edu> writes:
-
- You have to go to Options->Frame Appearance and unselect
- `Frame-Local Font Menu'. If this option is selected, font changes
- are only applied to the *current* frame and do *not* get saved
- when you save options.
-
- For XEmacs 19.15 and later:
-
- Implement the above as well as set the following in your `.emacs'
-
- (setq options-save-faces t)
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Customization
-
-Q3.0.8: How do I get a single minibuffer frame?
------------------------------------------------
-
- Vin Shelton <acs@acm.org> writes:
-
- (setq initial-frame-plist '(minibuffer nil))
- (setq default-frame-plist '(minibuffer nil))
- (setq default-minibuffer-frame
- (make-frame
- '(minibuffer only
- width 86
- height 1
- menubar-visible-p nil
- default-toolbar-visible-p nil
- name "minibuffer"
- top -2
- left -2
- has-modeline-p nil)))
- (frame-notice-user-settings)
-
- *Please note:* The single minibuffer frame may not be to everyone's
-taste, and there any number of other XEmacs options settings that may
-make it difficult or inconvenient to use.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.1.1, Prev: Q3.0.8, Up: Customization
-
-Q3.0.9: What is `Customize'?
-----------------------------
-
- Starting with XEmacs 20.2 there is new system 'Customize' for
-customizing XEmacs options.
-
- You can access `Customize' from the `Options' menu or invoking one
-of customize commands by typing eg. `M-x customize', `M-x
-customize-face', `M-x customize-variable' or `M-x customize-apropos'.
-
- Starting with XEmacs 20.3 there is also new `browser' mode for
-Customize. Try it out with `M-x customize-browse'
-
-\1f
-File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.9, Up: Customization
-
-3.1: X Window System & Resources
-================================
-
-Q3.1.1: Where is a list of X resources?
----------------------------------------
-
- Search through the `NEWS' file for `X Resources'. A fairly
-comprehensive list is given after it.
-
- In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
-listing the defaults. The file `etc/sample.Xdefaults' gives a set of
-defaults that you might consider. It is essentially the same as
-`etc/Emacs.ad' but some entries are slightly altered. Be careful about
-installing the contents of this file into your `.Xdefaults' or
-`.Xresources' file if you use GNU Emacs under X11 as well.
-
-\1f
-File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Customization
-
-Q3.1.2: How can I detect a color display?
------------------------------------------
-
- You can test the return value of the function `(device-class)', as
-in:
-
- (when (eq (device-class) 'color)
- (set-face-foreground 'font-lock-comment-face "Grey")
- (set-face-foreground 'font-lock-string-face "Red")
- ....
- )
-
-\1f
-File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization
-
-Q3.1.3: `(set-screen-width)' worked in 19.6, but not in 19.13?
---------------------------------------------------------------
-
- In Lucid Emacs 19.6 I did `(set-screen-width CHARACTERS)' and
-`(set-screen-height LINES)' in my `.emacs' instead of specifying
-`Emacs*EmacsScreen.geometry' in my `.Xdefaults' but this does not work
-in XEmacs 19.13.
-
- These two functions now take frame arguments:
-
- (set-frame-width (selected-frame) CHARACTERS)
- (set-frame-height (selected-frame) LINES)
-
-\1f
-File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization
-
-Q3.1.4: Specifying `Emacs*EmacsScreen.geometry' in `.emacs' does not work in 19.15?
------------------------------------------------------------------------------------
-
- In XEmacs 19.11 I specified `Emacs*EmacsScreen.geometry' in my
-`.emacs' but this does not work in XEmacs 19.15.
-
- We have switched from using the term "screen" to using the term
-"frame".
-
- The correct entry for your `.Xdefaults' is now:
-
- Emacs*EmacsFrame.geometry
-
-\1f
-File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.1.6, Prev: Q3.1.4, Up: Customization
-
-Q3.1.5: How can I get the icon to just say `XEmacs'?
-----------------------------------------------------
-
- I'd like the icon to just say `XEmacs', and not include the name of
-the current file in it.
-
- Add the following line to your `.emacs':
-
- (setq frame-icon-title-format "XEmacs")
-
-\1f
-File: xemacs-faq.info, Node: Q3.1.6, Next: Q3.1.7, Prev: Q3.1.5, Up: Customization
-
-Q3.1.6: How can I have the window title area display the full path?
--------------------------------------------------------------------
-
- I'd like to have the window title area display the full
-directory/name of the current buffer file and not just the name.
-
- Add the following line to your `.emacs':
-
- (setq frame-title-format "%S: %f")
-
- A more sophisticated title might be:
-
- (setq frame-title-format
- '("%S: " (buffer-file-name "%f"
- (dired-directory dired-directory "%b"))))
-
- That is, use the file name, or the dired-directory, or the buffer
-name.
-
-\1f