/[emacs]/emacs/lisp/generic-x.el
ViewVC logotype

Diff of /emacs/lisp/generic-x.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by tamm, Tue Dec 10 16:57:48 2002 UTC revision 1.19 by pbreton, Sat Mar 22 13:00:38 2003 UTC
# Line 845  you must reload generic-x to enable the Line 845  you must reload generic-x to enable the
845    
846  ;; InstallShield RUL files  ;; InstallShield RUL files
847  ;; Contributed by  Alfred.Correira@Pervasive.Com  ;; Contributed by  Alfred.Correira@Pervasive.Com
848    ;; Bugfixes by "Rolf Sandau" <Rolf.Sandau@marconi.com>
849  (and  (and
850  (memq 'rul-generic-mode generic-extras-enable-list)  (memq 'rul-generic-mode generic-extras-enable-list)
851  ;;; build the regexp strings using regexp-opt  ;;; build the regexp strings using regexp-opt
# Line 1400  you must reload generic-x to enable the Line 1401  you must reload generic-x to enable the
1401     )     )
1402    "Function argument constants used in InstallShield 3 and 5.")    "Function argument constants used in InstallShield 3 and 5.")
1403    
1404  (define-generic-mode 'rul-generic-mode  (progn
1405    ;; Using "/*" and "*/" doesn't seem to be working right    (defvar rul-generic-mode-syntax-table nil
1406    (list "//")       "Syntax table to use in rul-generic-mode buffers.")
1407    installshield-statement-keyword-list  
1408    (list     (setq rul-generic-mode-syntax-table
1409     ;; preprocessor constructs           (make-syntax-table c++-mode-syntax-table))
1410     '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)"  
1411       1 font-lock-string-face)     (modify-syntax-entry ?\r "> b"   rul-generic-mode-syntax-table)
1412     '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"     (modify-syntax-entry ?\n "> b"   rul-generic-mode-syntax-table)
1413       (1 font-lock-constant-face)  
1414       (2 font-lock-variable-name-face nil t))     (cond
1415     ;; indirect string constants         ;; XEmacs 19 & 20 & 21
1416     '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face)      ((memq '8-bit c-emacs-features)
1417     ;; gotos       (modify-syntax-entry ?/  ". 1456" rul-generic-mode-syntax-table)
1418     '("[ \t]*\\(\\sw+:\\)" 1 font-lock-constant-face)         (modify-syntax-entry ?*  ". 23"   rul-generic-mode-syntax-table)
1419     '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?"         )
1420       (1 font-lock-keyword-face)      ;; Emacs 19 & 20
1421       (2 font-lock-constant-face nil t))      ((memq '1-bit c-emacs-features)
1422     ;; system variables       (modify-syntax-entry ?/  ". 124b" rul-generic-mode-syntax-table)
1423     (generic-make-keywords-list         (modify-syntax-entry ?*  ". 23"   rul-generic-mode-syntax-table)
1424      installshield-system-variables-list         )
1425      'font-lock-variable-name-face "[^_]" "[^_]")      ;; incompatible
1426     ;; system functions      (t (error "Run Mode is incompatible with this version of Emacs"))
1427     (generic-make-keywords-list      )
1428      installshield-system-functions-list  
1429      'font-lock-function-name-face "[^_]" "[^_]")     ;; here manually instead
1430     ;; type keywords     (defun generic-rul-mode-setup-function ()
1431     (generic-make-keywords-list       (make-local-variable            'parse-sexp-ignore-comments)
1432      installshield-types-list       (make-local-variable            'comment-start)
1433      'font-lock-type-face "[^_]" "[^_]")       (make-local-variable            'comment-start-skip)
1434     ;; function argument constants       (make-local-variable            'comment-end)
1435     (generic-make-keywords-list       (setq imenu-generic-expression
1436      installshield-funarg-constants-list             '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))
1437      'font-lock-variable-name-face "[^_]" "[^_]") ; is this face the best choice?             parse-sexp-ignore-comments t
1438     )             comment-end               "*/"
1439    (list "\\.[rR][uU][lL]$")             comment-start             "/*"
1440    (list  ;;         comment-end               ""
1441     (function  ;;         comment-start             "//"
1442      (lambda ()  ;;         comment-start-skip        ""
1443        (setq imenu-generic-expression             )
1444      '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)))  ;;     (set-syntax-table              rul-generic-mode-syntax-table)
1445        )))       (setq font-lock-syntax-table rul-generic-mode-syntax-table)
1446    "Generic mode for InstallShield RUL files.")       )
1447    
1448       ;; moved mode-definition behind defun-definition to be warning-free - 15.11.02/RSan
1449       (define-generic-mode 'rul-generic-mode
1450         ;; Using "/*" and "*/" doesn't seem to be working right
1451         (list "//" '("/*" . "*/" ))
1452         installshield-statement-keyword-list
1453         (list
1454          ;; preprocessor constructs
1455          '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)"
1456            1 font-lock-string-face)
1457          '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?"
1458            (1 font-lock-reference-face)
1459            (2 font-lock-variable-name-face nil t))
1460          ;; indirect string constants
1461          '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face)
1462          ;; gotos
1463          '("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face)
1464          '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?"
1465            (1 font-lock-keyword-face)
1466            (2 font-lock-reference-face nil t))
1467          ;; system variables
1468          (generic-make-keywords-list
1469           installshield-system-variables-list
1470           'font-lock-variable-name-face "[^_]" "[^_]")
1471          ;; system functions
1472          (generic-make-keywords-list
1473           installshield-system-functions-list
1474           'font-lock-function-name-face "[^_]" "[^_]")
1475          ;; type keywords
1476          (generic-make-keywords-list
1477           installshield-types-list
1478           'font-lock-type-face "[^_]" "[^_]")
1479          ;; function argument constants
1480          (generic-make-keywords-list
1481           installshield-funarg-constants-list
1482           'font-lock-variable-name-face "[^_]" "[^_]") ; is this face the best choice?
1483          )
1484         (list "\\.[rR][uU][lL]$")
1485         (list 'generic-rul-mode-setup-function)
1486         "Generic mode for InstallShield RUL files.")
1487    )
1488  (define-skeleton rul-if  (define-skeleton rul-if
1489     "Insert an if statement."     "Insert an if statement."
1490     "condition: "     "condition: "
# Line 1835  you must reload generic-x to enable the Line 1876  you must reload generic-x to enable the
1876    "Generic mode for ASTAP circuit netlist files."    "Generic mode for ASTAP circuit netlist files."
1877    )    )
1878    
1879    (define-generic-mode  'etc-modules-conf-generic-mode
1880      ;;List of comment characters
1881      (list ?#)
1882      ;;List of keywords
1883      (list "alias" "pre-install" "post-install" "options" "probeall")
1884      ;;List of additional font-lock-expressions
1885      nil
1886      ;;List of additional automode-alist expressions
1887      (list "/etc/modules.conf" "/etc/conf.modules")
1888      ;;List of set up functions to call
1889      nil
1890      )
1891    
1892  (provide 'generic-x)  (provide 'generic-x)
1893    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26