[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Personal Environment

4.1 I want use Alt key not as Meta, but as Alt key itself.  
4.2 How can I highlight a region of text?  
4.3 How can I display matching parentheses in color?  
4.4 I don't want the menu-bar and the scroll-bar.  
4.5 The scroll-bar is displayed on the left side, when I toggles the scroll-bar on.  
4.6 How do I make Meadow display the current line number?  
4.7 How do I make Meadow display the current column number?  
4.8 How do I tell Emacs to automatically indent a new line to the indentation of the previous line?  
4.9 I want to switch the color of the cursor color according to IME status.  
4.10 How do I customize Meadow more likely to Windows applications?  
4.11 How do I get rid of *Message* buffer?  
4.12 I want Meadow to delete the whole line when I type one C-k at the beginning of a line.  
4.13 How can I display the mode-line in a different font?  
4.14 How do I display time in the mode line?  
4.15 How do I change the color of the mode line?  
4.16 Where can I find the list of colors to use for "face"?  
4.17 I don't want Meadow to insert a new line when I do next-line at the end of a buffer.  
4.18 How do I bind C-, and C-. to scrolling by 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.  
4.20 I cannot set a hook well with (setq xxx-hook yyyy).  
4.21 How do I make a frame only for minibuffer?  
4.22 How do I stop Emacs from beeping on a terminal?  
4.23 How do I change the beep sound?  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2 How can I highlight a region of text?

Put
 
(transient-mark-mode 1)
in your `.emacs'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 How can I display matching parentheses in color?

Put
 
(show-paren-mode 1)
in your `.emacs'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4 I don't want the menu-bar and the scroll-bar.

Put either one of the following to your `.emacs':


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.6 How do I make Meadow display the current line number?

Put
 
(line-number-mode 1)

in your `.emacs'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.7 How do I make Meadow display the current column number?

Put
 
(column-number-mode 1)

in your `.emacs'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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"))))


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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
 
(kill-buffer *Message*)
in your `.emacs'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.12 I want Meadow to delete the whole line when I type one C-k at the beginning of a line.

Put
 
(setq kill-whole-line t)

in your `.emacs'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.14 How do I display time in the mode line?

Put
 
(display-time)
in your `.emacs'. You can also toggle displaying with M-x display-time-mode.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.15 How do I change the color of the mode line?

 
(set-face-foreground 'modeline "black")
(set-face-background 'modeline "white")


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.16 Where can I find the list of colors to use for "face"?

You can find in $MEADOW/$VERSION/etc/rgb.txt.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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)))


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.22 How do I stop Emacs from beeping on a terminal?

Put
 
(setq visible-bell t)

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.23 How do I change the beep sound?

You can change it with
 
(set-message-beep SOUND)

SOUND must be one of 'asterisk, 'exclamation, 'hand, 'question, 'ok, or nil. Nil means the ordinary beep sound.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Keiichiro Nagano on April, 5 2002 using texi2html