Mercurial > hg > xemacs-beta
diff lisp/hm--html-menus/tmpl-minor-mode.el @ 116:9f59509498e1 r20-1b10
Import from CVS: tag r20-1b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:23:06 +0200 |
parents | cf808b4c4290 |
children | 25f70ba0133c |
line wrap: on
line diff
--- a/lisp/hm--html-menus/tmpl-minor-mode.el Mon Aug 13 09:21:56 2007 +0200 +++ b/lisp/hm--html-menus/tmpl-minor-mode.el Mon Aug 13 09:23:06 2007 +0200 @@ -1,6 +1,6 @@ ;;; tmpl-minor-mode.el --- Template Minor Mode ;;; -;;; $Id: tmpl-minor-mode.el,v 1.3 1997/03/04 02:29:42 steve Exp $ +;;; $Id: tmpl-minor-mode.el,v 1.4 1997/03/28 02:28:43 steve Exp $ ;;; ;;; Copyright (C) 1993 - 1997 Heiko Muenkel ;;; email: muenkel@tnt.uni-hannover.de @@ -61,8 +61,8 @@ (defvar tmpl-template-dir-list nil "*A list of directories with the template files. -If it is nil, then the default-directory is used. -If more the one directories are given, then the +If it is nil, then the default-directory will be used. +If more than one directory is given, then the template filenames should differ in all directories. This variable is used in the commands for inserting templates. @@ -388,8 +388,8 @@ ;;;###autoload (defun tmpl-expand-templates-in-region (&optional begin end) - "Expand the templates in the region from BEGIN to END. -If BEGIN and and are nil, then the current region is used." + "Expands the templates in the region from BEGIN to END. +If BEGIN and END are nil, then the current region is used." (interactive) (tmpl-save-excursion (narrow-to-region (or begin (region-beginning)) @@ -402,13 +402,13 @@ ;;;###autoload (defun tmpl-expand-templates-in-buffer () - "Expand all templates in the current buffer." + "Expands all templates in the current buffer." (interactive) (tmpl-expand-templates-in-region (point-min) (point-max))) (defun tmpl-escape-tmpl-sign-in-region (&optional begin end) - "Escape all `tmpl-sign' with a `tmpl-sign' in the region from BEGIN to END. + "Escapes all `tmpl-sign' with a `tmpl-sign' in the region from BEGIN to END. If BEGIN and END are nil, then the active region between mark and point is used." (interactive) @@ -483,7 +483,6 @@ (table nil) (file nil) (answer nil) - (start nil) (anser-not-ok t) (internal-history (mapcar '(lambda (path) (file-name-nondirectory path)) @@ -522,15 +521,15 @@ (defun tmpl-insert-template-file-from-fixed-dirs (file) "Inserts a template FILE and expands it, if `tmpl-automatic-expand' is t. This command tries to read the template file from a list of -predefined directries (look at `tmpl-template-dir-list') and it filters -the contents of this directories with the regular expression +predefined directories (look at `tmpl-template-dir-list') and it filters +the contents of these directories with the regular expression `tmpl-filter-regexp' (look also at this variable). The command uses a history variable, which could be changed with the variable `tmpl-history-variable-name'. -The user of the command is able to change interactive to another +The user of the command is able to change interactively to another directory by entering at first the string \"Change the directory\". -This maybe to difficult for the user. Therefore another command +This may be too difficult for the user. Therefore another command called `tmpl-insert-template-file' exist, which doesn't use fixed directories and filters." (interactive @@ -545,7 +544,7 @@ ;;;###autoload (defun tmpl-insert-template-file (file) - "Insert a template FILE and expand it, if `tmpl-automatic-expand' is t. + "Inserts a template FILE and expand it, if `tmpl-automatic-expand' is t. Look also at `tmpl-template-dir-list', to specify a default template directory. You should also take a look at `tmpl-insert-template-file-from-fixed-dirs' which has additional advantages (and disadvantages :-). @@ -622,23 +621,24 @@ (if (adapt-xemacsp) (defun tmpl-define-minor-mode-keymap () "Defines the minor mode keymap." - (define-key tmpl-minor-mode-map [(control c) x] + (define-key tmpl-minor-mode-map [(control c) (control c) x] 'tmpl-expand-templates-in-region) - (define-key tmpl-minor-mode-map [(control c) (control x)] + (define-key tmpl-minor-mode-map [(control c) (control c) (control x)] 'tmpl-expand-templates-in-buffer) - (define-key tmpl-minor-mode-map [(control c) escape] + (define-key tmpl-minor-mode-map [(control c) (control c) e] 'tmpl-escape-tmpl-sign-in-region) - (define-key tmpl-minor-mode-map [(control c) (control escape)] + (define-key tmpl-minor-mode-map + [(control c) (control c) (control e)] 'tmpl-escape-tmpl-sign-in-buffer)) (defun tmpl-define-minor-mode-keymap () "Defines the minor mode keymap." - (define-key tmpl-minor-mode-map [?\C-c ?x] + (define-key tmpl-minor-mode-map [?\C-c ?\C-c ?x] 'tmpl-expand-templates-in-region) - (define-key tmpl-minor-mode-map [?\C-c ?\C-x] + (define-key tmpl-minor-mode-map [?\C-c ?\C-c ?\C-x] 'tmpl-expand-templates-in-buffer) - (define-key tmpl-minor-mode-map [?\C-c escape] + (define-key tmpl-minor-mode-map [?\C-c ?\C-c ?e] 'tmpl-escape-tmpl-sign-in-region) - (define-key tmpl-minor-mode-map [?\C-c C-escape] + (define-key tmpl-minor-mode-map [?\C-c ?\C-c ?\C-e] 'tmpl-escape-tmpl-sign-in-buffer)) )