diff options
| author | Lute Kamstra | 2005-04-13 09:24:57 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2005-04-13 09:24:57 +0000 |
| commit | a2d66c78bb183476b4976e879857b011e155a2c1 (patch) | |
| tree | 63a337c71d233201ebad7b91f5d7bdd2ab60e987 /lisp | |
| parent | 59d922a4da1890ff5e773b1c0e0a8d3f310a4bdf (diff) | |
| download | emacs-a2d66c78bb183476b4976e879857b011e155a2c1.tar.gz emacs-a2d66c78bb183476b4976e879857b011e155a2c1.zip | |
(generic-mode-ini-file-find-file-hook):
Rename to ini-generic-mode-find-file-hook.
Keep generic-mode-ini-file-find-file-hook as an alias.
(ini-generic-mode-find-file-hook): Rename from
generic-mode-ini-file-find-file-hook. Fix docstring.
(ini-generic-mode): Docstring change.
(bat-generic-mode-run-as-comint): Silence the byte compiler.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/generic-x.el | 28 |
2 files changed, 31 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a07511a771d..0b355fec5f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2005-04-13 Lute Kamstra <lute@gnu.org> | ||
| 2 | |||
| 3 | * generic-x.el (generic-mode-ini-file-find-file-hook): | ||
| 4 | Rename to ini-generic-mode-find-file-hook. | ||
| 5 | Keep generic-mode-ini-file-find-file-hook as an alias. | ||
| 6 | (ini-generic-mode-find-file-hook): Rename from | ||
| 7 | generic-mode-ini-file-find-file-hook. Fix docstring. | ||
| 8 | (ini-generic-mode): Docstring change. | ||
| 9 | (bat-generic-mode-run-as-comint): Silence the byte compiler. | ||
| 10 | |||
| 11 | * help.el (describe-key-briefly): UNTRANSLATED can be nil when | ||
| 12 | called from lisp. | ||
| 13 | |||
| 14 | * generic.el: Move to the emacs-lisp subdir. | ||
| 15 | |||
| 1 | 2005-04-12 Dan Nicolaescu <dann@ics.uci.edu> | 16 | 2005-04-12 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 17 | ||
| 3 | * term/xterm.el (function-key-map): Add mappings for A-, C-, S- | 18 | * term/xterm.el (function-key-map): Add mappings for A-, C-, S- |
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index f700ff6041d..a13103edb3d 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -178,16 +178,6 @@ This hook will be installed if the variable | |||
| 178 | (goto-char (point-min)) | 178 | (goto-char (point-min)) |
| 179 | (default-generic-mode))))) | 179 | (default-generic-mode))))) |
| 180 | 180 | ||
| 181 | (defun generic-mode-ini-file-find-file-hook () | ||
| 182 | "Hook function to enter Default-Generic mode automatically for INI files. | ||
| 183 | Done if the first few lines of a file in Fundamental mode look like an | ||
| 184 | INI file. This hook is NOT installed by default." | ||
| 185 | (and (eq major-mode 'fundamental-mode) | ||
| 186 | (save-excursion | ||
| 187 | (goto-char (point-min)) | ||
| 188 | (and (looking-at "^\\s-*\\[.*\\]") | ||
| 189 | (ini-generic-mode))))) | ||
| 190 | |||
| 191 | (and generic-use-find-file-hook | 181 | (and generic-use-find-file-hook |
| 192 | (add-hook 'find-file-hook 'generic-mode-find-file-hook)) | 182 | (add-hook 'find-file-hook 'generic-mode-find-file-hook)) |
| 193 | 183 | ||
| @@ -375,8 +365,21 @@ generic-x to enable the specified modes." | |||
| 375 | (setq imenu-generic-expression | 365 | (setq imenu-generic-expression |
| 376 | '((nil "^\\[\\(.*\\)\\]" 1) | 366 | '((nil "^\\[\\(.*\\)\\]" 1) |
| 377 | ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1)))))) | 367 | ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1)))))) |
| 378 | "Generic mode for MS-Windows INI files." | 368 | "Generic mode for MS-Windows INI files. |
| 379 | :group 'generic-x)) | 369 | You can use `ini-generic-mode-find-file-hook' to enter this mode |
| 370 | automatically for INI files whose names do not end in \".ini\"." | ||
| 371 | :group 'generic-x) | ||
| 372 | |||
| 373 | (defun ini-generic-mode-find-file-hook () | ||
| 374 | "Hook function to enter Ini-Generic mode automatically for INI files. | ||
| 375 | Done if the first few lines of a file in Fundamental mode look | ||
| 376 | like an INI file. You can add this hook to `find-file-hook'." | ||
| 377 | (and (eq major-mode 'fundamental-mode) | ||
| 378 | (save-excursion | ||
| 379 | (goto-char (point-min)) | ||
| 380 | (and (looking-at "^\\s-*\\[.*\\]") | ||
| 381 | (ini-generic-mode))))) | ||
| 382 | (defalias 'generic-mode-ini-file-find-file-hook 'ini-generic-mode-find-file-hook)) | ||
| 380 | 383 | ||
| 381 | ;;; Windows REG files | 384 | ;;; Windows REG files |
| 382 | ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax! | 385 | ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax! |
| @@ -487,6 +490,7 @@ generic-x to enable the specified modes." | |||
| 487 | (compile | 490 | (compile |
| 488 | (concat (w32-shell-name) " -c " (buffer-file-name))))) | 491 | (concat (w32-shell-name) " -c " (buffer-file-name))))) |
| 489 | 492 | ||
| 493 | (eval-when-compile (require 'comint)) | ||
| 490 | (defun bat-generic-mode-run-as-comint () | 494 | (defun bat-generic-mode-run-as-comint () |
| 491 | "Run the current BAT file in a comint buffer." | 495 | "Run the current BAT file in a comint buffer." |
| 492 | (interactive) | 496 | (interactive) |