]> code.delx.au - gnu-emacs-elpa/blob - packages/notes-mode/notes-emacs.el
Add notes-mode.
[gnu-emacs-elpa] / packages / notes-mode / notes-emacs.el
1
2 ;;;
3 ;;; notes-emacs.el
4 ;;; $Id: notes-emacs.el,v 1.3 2007/11/06 02:41:21 johnh Exp $
5 ;;;
6 ;;; Copyright (C) 1998 by John Heidemann
7 ;;; Comments to <johnh@isi.edu>.
8 ;;;
9 ;;; This file is under the Gnu Public License.
10 ;;;
11
12 ;;
13 ;; (FSF) emacs-specific parts of notes-mode.
14 ;;
15
16 (defun notes-platform-bind-mouse (map generic-key fn)
17 "Map emacs symbols (a no-op)."
18 (define-key map (vconcat (list generic-key)) fn))
19
20
21 (defun notes-platform-font-lock (new-font-lock-keywords)
22 "Notes platform-specific font-lock mode."
23 (require 'font-lock)
24 (if (>= emacs-major-version 20)
25 (progn
26 ;; emacs-20
27 (make-local-variable 'font-lock-defaults)
28 (setq font-lock-defaults
29 (list
30 new-font-lock-keywords
31 t
32 nil
33 nil
34 'beginning-of-line)))
35 ;; emacs-19
36 (make-local-variable 'font-lock-no-comments)
37 (setq font-lock-no-comments t)
38 (make-local-variable 'font-lock-keywords)
39 (setq font-lock-keywords new-font-lock-keywords)
40 (font-lock-mode 1)))
41
42
43 (defun notes-platform-init ()
44 "Init platform-specific stuff for notes-mode."
45 (if notes-platform-inited
46 t
47 (setq notes-platform-inited t)
48 (if (eq notes-bold-face 'notes-bold-face)
49 (copy-face 'bold notes-bold-face))))
50
51 (provide 'notes-emacs)
52
53
54