emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/generic-x.el


From: Lute Kamstra
Subject: [Emacs-diffs] Changes to emacs/lisp/generic-x.el
Date: Wed, 13 Apr 2005 05:21:49 -0400

Index: emacs/lisp/generic-x.el
diff -c emacs/lisp/generic-x.el:1.32 emacs/lisp/generic-x.el:1.33
*** emacs/lisp/generic-x.el:1.32        Mon Apr 11 23:34:04 2005
--- emacs/lisp/generic-x.el     Wed Apr 13 09:21:49 2005
***************
*** 178,193 ****
        (goto-char (point-min))
        (default-generic-mode)))))
  
- (defun generic-mode-ini-file-find-file-hook ()
-   "Hook function to enter Default-Generic mode automatically for INI files.
- Done if the first few lines of a file in Fundamental mode look like an
- INI file.  This hook is NOT installed by default."
-   (and (eq major-mode 'fundamental-mode)
-        (save-excursion
-        (goto-char (point-min))
-        (and (looking-at "^\\s-*\\[.*\\]")
-             (ini-generic-mode)))))
- 
  (and generic-use-find-file-hook
      (add-hook 'find-file-hook 'generic-mode-find-file-hook))
  
--- 178,183 ----
***************
*** 375,382 ****
        (setq imenu-generic-expression
            '((nil "^\\[\\(.*\\)\\]" 1)
              ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))))))
!   "Generic mode for MS-Windows INI files."
!   :group 'generic-x))
  
  ;;; Windows REG files
  ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
--- 365,385 ----
        (setq imenu-generic-expression
            '((nil "^\\[\\(.*\\)\\]" 1)
              ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))))))
!   "Generic mode for MS-Windows INI files.
! You can use `ini-generic-mode-find-file-hook' to enter this mode
! automatically for INI files whose names do not end in \".ini\"."
!   :group 'generic-x)
! 
! (defun ini-generic-mode-find-file-hook ()
!   "Hook function to enter Ini-Generic mode automatically for INI files.
! Done if the first few lines of a file in Fundamental mode look
! like an INI file.  You can add this hook to `find-file-hook'."
!   (and (eq major-mode 'fundamental-mode)
!        (save-excursion
!        (goto-char (point-min))
!        (and (looking-at "^\\s-*\\[.*\\]")
!             (ini-generic-mode)))))
! (defalias 'generic-mode-ini-file-find-file-hook 
'ini-generic-mode-find-file-hook))
  
  ;;; Windows REG files
  ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
***************
*** 487,492 ****
--- 490,496 ----
      (compile
       (concat (w32-shell-name) " -c " (buffer-file-name)))))
  
+ (eval-when-compile (require 'comint))
  (defun bat-generic-mode-run-as-comint ()
    "Run the current BAT file in a comint buffer."
    (interactive)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]