4. Personal Environment
4.1 I want use Alt key not as Meta, but as Alt key itself.
Put
| (w32-set-modifier-key 18 nil)
(w32-set-modifier-key 18 'none)
|
in your `.emacs'.
Note that Alt key generates M-x when you write the first line only.
4.2 How can I highlight a region of text?
Put
in your `.emacs'.
4.3 How can I display matching parentheses in color?
Put
in your `.emacs'.
4.4 I don't want the menu-bar and the scroll-bar.
Put either one of the following to your `.emacs':
- To add into default-frame-alist:
| (setq default-frame-alist
'(append (list '(menu-bar . nil)
(vertical-scroll-bars . nil))
default-frame-alist))
|
- To configure independently:
| (menu-bar-mode -1)
(scroll-bar-mode -1)
|
4.5 The scroll-bar is displayed on the left side, when I toggles the scroll-bar on.
To display the scroll-bar on the right side, put
| (setq scroll-bar-mode 'right)
|
in your `.emacs'.
4.6 How do I make Meadow display the current line number?
Put
in your `.emacs'.
4.7 How do I make Meadow display the current column number?
Put
in your `.emacs'.
4.8 How do I tell Emacs to automatically indent a new line to the indentation of the previous line?
Put
| (setq indent-line-function
'indent-relative-maybe)
|
in your `.emacs'. Then C-j will automatically indent the
next line to the indentation of the previous line, except for some modes
that re-binds indent-line-function
.
4.9 I want to switch the color of the cursor color according to IME status.
Put following codes into your `.emacs':
| (add-hook 'mw32-ime-on-hook
(function (lambda () (set-cursor-color "red"))))
(add-hook 'mw32-ime-off-hook
(function (lambda () (set-cursor-color "black"))))
|
4.10 How do I customize Meadow more likely to Windows applications?
You can use C-c, C-v, C-x, etc. with
CUA-mode.
You can also use pc-bindings-mode and pc-selection-mode, which come with
Meadow. For more detail, type C-h f (describe-function) and refer
to the respective description of the mode.
4.11 How do I get rid of *Message* buffer?
To keep from increasing *Message* buffer, put
| (setq message-log-max nil)
|
in your `.emacs'.
To get rid of the *Message* buffer itself, put
in your `.emacs'.
4.12 I want Meadow to delete the whole line when I type one C-k at the beginning of a line.
Put
in your `.emacs'.
4.13 How can I display the mode-line in a different font?
Put
| (set-face-font 'modeline "FONTSET-NAME")
|
in your `.emacs'. Change FONTSET-NAME according to your taste.
4.14 How do I display time in the mode line?
Put
in your `.emacs'. You can also toggle displaying with M-x
display-time-mode.
4.15 How do I change the color of the mode line?
| (set-face-foreground 'modeline "black")
(set-face-background 'modeline "white")
|
4.16 Where can I find the list of colors to use for "face"?
You can find in $MEADOW/$VERSION/etc/rgb.txt.
4.17 I don't want Meadow to insert a new line when I do next-line at the end of a buffer.
Put
| (setq next-line-add-newlines nil)
|
in your `.emacs'.
4.18 How do I bind C-, and C-. to scrolling by one line?
Put the following code to your `.emacs':
| (defun scroll-up-one-line ()
(interactive)
(scroll-up 1))
(defun scroll-down-one-line ()
(interactive)
(scroll-down 1))
(global-set-key [?\C-,] 'scroll-up-one-line)
(global-set-key [?\C-.] 'scroll-down-one-line)
|
4.19 How do I stop Meadow from warning `beginning-of-buffer' when I do previous-line at the beginning of a buffer.
Put the following code to your `.emacs':
| (defun previous-line (arg)
(interactive "p")
(if (interactive-p)
(condition-case nil
(line-move (- arg))
((beginning-of-buffer end-of-buffer)))
(line-move (- arg)))
nil)
|
4.20 I cannot set a hook well with (setq xxx-hook yyyy).
It would be overridden by other setting of the hook. Use `add-hook' to
set a hook. It is recommended to do like as
| (add-hook 'c-mode-hook '(lambda () (setq tab-width 4)))
|
This code adds the function at the beginning of the hook. If you
specify `t' as the third argument of add-hook, the function will be
added to the end of the hook.
4.21 How do I make a frame only for minibuffer?
| (setq default-minibuffer-frame
(make-frame '((name . "Minibuffer")
(minibuffer . only)
(width . 95)
(height . 1)
(left . 0)
(top . -1)
(auto-raise . t)))
default-frame-alist
'((minibuffer . nil)
(width . 80)
(height . 40)
(auto-raise . t)))
|
4.22 How do I stop Emacs from beeping on a terminal?
Put
in your `.emacs' to tell Meadow to use 'visible bell' instead of
the audible bell. A quarter of the display blinks to notify the error.
4.23 How do I change the beep sound?
You can change it with
SOUND must be one of 'asterisk, 'exclamation, 'hand, 'question,
'ok, or nil. Nil means the ordinary beep sound.
This document was generated
by Keiichiro Nagano on April, 5 2002
using texi2html