help-gnu-emacs
[Top][All Lists]
Advanced

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

newbie question about .emacs initialization file


From: Edward Casey
Subject: newbie question about .emacs initialization file
Date: Thu, 24 Jun 2004 11:39:59 -0500

I recenty downloaded Gnu emacs for Windows (using Win 98). Since Dos-based
systems allow only three characters for a file-name suffix, how do I get
lisp functions, etc. into the environment during loading? Do I have to do
a load-file after emacs is up and running? What is the init file name
under MS Windows?
I put the file macron.el into the site-lisp subdirectory. This goes
something like this:

;;*- coding: emacs-mule -*-

(defun macronize-char (event) "Place a macron over the vowel at point,
or where the mouse is clicked."
(interactive "e")
(if (and (listp event)
(member (event-basic-type event)
'(mouse-1 mouse-2 mouse-3)))
(mouse-set-point event))
(let ((c (char-after (point))))
(cond
((eq c ?a) (delete-char) (insert ?ā))
((eq c ?e) (delete-char) (insert ?ē))
((eq c ?i) (delete-char) (insert ?ī))
((eq c ?o) (delete-char) (insert ?ō))
((eq c ?u) (delete-char) (insert ?ū)))))

(define-key global-map [f12] 'macronize-char)
(define-key global-map [(meta mouse-1)] 'macronize-char)

This is obviously not newbie fodder but was provided by a kind coder on
another newsgroup. I would like to have mouse-1 instead of meta mouse-1
toggle the character at point from macroned to plain (un-macroned). Then
f12 or some other key would toggle to bind and unbind the lisp function to
mouse-1. Is that as clear as mud?

Thanks,
Ed



reply via email to

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