Mercurial > emacs
comparison lisp/emacs-lisp/easy-mmode.el @ 104912:ad1f780103d9
(easy-mmode-defmap): Add doc-string.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 10 Sep 2009 06:20:51 +0000 |
parents | 9792b61a3641 |
children | 0769a73f1d18 |
comparison
equal
deleted
inserted
replaced
104911:0261f99bf928 | 104912:ad1f780103d9 |
---|---|
1 ;;; easy-mmode.el --- easy definition for major and minor modes | 1 ;;; easy-mmode.el --- easy definition for major and minor modes |
2 | 2 |
3 ;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005, | 3 ;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
4 ;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 4 ;; 2008, 2009 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr> | 6 ;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr> |
7 ;; Maintainer: Stefan Monnier <monnier@gnu.org> | 7 ;; Maintainer: Stefan Monnier <monnier@gnu.org> |
8 | 8 |
9 ;; Keywords: extensions lisp | 9 ;; Keywords: extensions lisp |
450 ((consp inherit) (easy-mmode-set-keymap-parents m inherit))) | 450 ((consp inherit) (easy-mmode-set-keymap-parents m inherit))) |
451 m)) | 451 m)) |
452 | 452 |
453 ;;;###autoload | 453 ;;;###autoload |
454 (defmacro easy-mmode-defmap (m bs doc &rest args) | 454 (defmacro easy-mmode-defmap (m bs doc &rest args) |
455 "Define a constant M whose value is the result of `easy-mmode-define-keymap'. | |
456 The M, BS, and ARGS arguments are as per that function. DOC is | |
457 the constant's documentation." | |
455 `(defconst ,m | 458 `(defconst ,m |
456 (easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args)) | 459 (easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args)) |
457 ,doc)) | 460 ,doc)) |
458 | 461 |
459 | 462 |