Let ~/prolog.el consist of the forms:
(defun prolog-mode ()
(interactive)
(message "hi"))
(provide 'prolog)
When I do "$ emacs -Q" and evaluate:
(progn
(add-to-list 'load-path "~/")
(autoload 'prolog-mode "prolog" "Prolog mode" t)
(prolog-mode))
the message "hi" is displayed, like every further time I evaluate
(prolog-mode). "C-h f prolog-mode RET" shows:
prolog-mode is a Lisp function in `prolog.el'.
When I follow the link (`prolog.el'), it leads me to the wrong file,
namely ~/emacs/lisp/progmodes/prolog.el, i.e., part of Emacs source.
In GNU Emacs 23.0.60.1 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
of 2008-08-08 on pnsgw1-client079.demo.tuwien.ac.at
Windowing system distributor `The XFree86 Project, Inc', version
11.0.40400000
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t