comparison lisp/progmodes/sql.el @ 24058:85622273d1e8

(sql-mode-ansi-font-lock-keywords): Quote font-lock faces, eliminating the need to load font-lock before loading sql. (sql-mode-oracle-font-lock-keywords): Likewise. (sql-mode-postgres-font-lock-keywords): Likewise.
author Karl Heuer <kwzh@gnu.org>
date Tue, 12 Jan 1999 21:50:44 +0000
parents e546776e7a76
children f40837b25999
comparison
equal deleted inserted replaced
24057:4c733ca989dc 24058:85622273d1e8
2 2
3 ;; Copyright (C) 1998 Free Software Foundation, Inc. 3 ;; Copyright (C) 1998 Free Software Foundation, Inc.
4 4
5 ;; Author: Alex Schroeder <a.schroeder@bsiag.ch> 5 ;; Author: Alex Schroeder <a.schroeder@bsiag.ch>
6 ;; Maintainer: Alex Schroeder <a.schroeder@bsiag.ch> 6 ;; Maintainer: Alex Schroeder <a.schroeder@bsiag.ch>
7 ;; Version: 1.1.5 7 ;; Version: 1.1.6
8 ;; Keywords: processes SQL 8 ;; Keywords: processes SQL
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
362 ;; ANSI Keywords that look like types 362 ;; ANSI Keywords that look like types
363 "character" "cursor" "dec" "int" "real" 363 "character" "cursor" "dec" "int" "real"
364 ;; ANSI Reserved Word that look like types 364 ;; ANSI Reserved Word that look like types
365 "char" "integer" "smallint" ) t) "\\b")))) 365 "char" "integer" "smallint" ) t) "\\b"))))
366 (setq sql-mode-ansi-font-lock-keywords 366 (setq sql-mode-ansi-font-lock-keywords
367 (list (cons ansi-keywords font-lock-function-name-face) 367 (list (cons ansi-keywords 'font-lock-function-name-face)
368 (cons ansi-reserved-words font-lock-keyword-face) 368 (cons ansi-reserved-words 'font-lock-keyword-face)
369 (cons ansi-types font-lock-type-face))))) 369 (cons ansi-types 'font-lock-type-face)))))
370 370
371 (defvar sql-mode-oracle-font-lock-keywords nil 371 (defvar sql-mode-oracle-font-lock-keywords nil
372 "Oracle SQL keywords used by font-lock. 372 "Oracle SQL keywords used by font-lock.
373 373
374 This variable is used by `sql-mode' and `sql-interactive-mode'. The 374 This variable is used by `sql-mode' and `sql-interactive-mode'. The
432 "stddev" "sum" "substr" "substrb" "tan" "tanh" "to_char" 432 "stddev" "sum" "substr" "substrb" "tan" "tanh" "to_char"
433 "to_date" "to_label" "to_multi_byte" "to_number" "to_single_byte" 433 "to_date" "to_label" "to_multi_byte" "to_number" "to_single_byte"
434 "translate" "trunc" "uid" "upper" "userenv" "variance" "vsize") t) "\\b")))) 434 "translate" "trunc" "uid" "upper" "userenv" "variance" "vsize") t) "\\b"))))
435 (setq sql-mode-oracle-font-lock-keywords 435 (setq sql-mode-oracle-font-lock-keywords
436 (append sql-mode-ansi-font-lock-keywords 436 (append sql-mode-ansi-font-lock-keywords
437 (list (cons oracle-keywords font-lock-function-name-face) 437 (list (cons oracle-keywords 'font-lock-function-name-face)
438 (cons oracle-reserved-words font-lock-keyword-face) 438 (cons oracle-reserved-words 'font-lock-keyword-face)
439 ;; XEmacs doesn't have font-lock-builtin-face 439 ;; XEmacs doesn't have font-lock-builtin-face
440 (if (string-match "XEmacs\\|Lucid" emacs-version) 440 (if (string-match "XEmacs\\|Lucid" emacs-version)
441 (cons oracle-builtin-functions font-lock-preprocessor-face) 441 (cons oracle-builtin-functions 'font-lock-preprocessor-face)
442 ;; GNU Emacs 19 doesn't have it either 442 ;; GNU Emacs 19 doesn't have it either
443 (if (string-match "GNU Emacs 19" emacs-version) 443 (if (string-match "GNU Emacs 19" emacs-version)
444 (cons oracle-builtin-functions font-lock-function-name-face) 444 (cons oracle-builtin-functions 'font-lock-function-name-face)
445 ;; Emacs 445 ;; Emacs
446 (cons oracle-builtin-functions font-lock-builtin-face))) 446 (cons oracle-builtin-functions 'font-lock-builtin-face)))
447 (cons oracle-types font-lock-type-face)))))) 447 (cons oracle-types 'font-lock-type-face))))))
448 448
449 (defvar sql-mode-postgres-font-lock-keywords nil 449 (defvar sql-mode-postgres-font-lock-keywords nil
450 "Postgres SQL keywords used by font-lock. 450 "Postgres SQL keywords used by font-lock.
451 451
452 This variable is used by `sql-mode' and `sql-interactive-mode'. The 452 This variable is used by `sql-mode' and `sql-interactive-mode'. The
480 "substring" "text" "timespan" "translate" "trim" "upgradepath" 480 "substring" "text" "timespan" "translate" "trim" "upgradepath"
481 "upgradepoly" "upper" "varchar" "width" 481 "upgradepoly" "upper" "varchar" "width"
482 ) t) "\\b")))) 482 ) t) "\\b"))))
483 (setq sql-mode-postgres-font-lock-keywords 483 (setq sql-mode-postgres-font-lock-keywords
484 (append sql-mode-ansi-font-lock-keywords 484 (append sql-mode-ansi-font-lock-keywords
485 (list (cons postgres-reserved-words font-lock-keyword-face) 485 (list (cons postgres-reserved-words 'font-lock-keyword-face)
486 ;; XEmacs doesn't have font-lock-builtin-face 486 ;; XEmacs doesn't have 'font-lock-builtin-face
487 (if (string-match "XEmacs\\|Lucid" emacs-version) 487 (if (string-match "XEmacs\\|Lucid" emacs-version)
488 (cons postgres-builtin-functions font-lock-preprocessor-face) 488 (cons postgres-builtin-functions 'font-lock-preprocessor-face)
489 ;; Emacs 489 ;; Emacs
490 (cons postgres-builtin-functions font-lock-builtin-face)) 490 (cons postgres-builtin-functions 'font-lock-builtin-face))
491 (cons postgres-types font-lock-type-face)))))) 491 (cons postgres-types 'font-lock-type-face))))))
492 492
493 493
494 (defvar sql-mode-font-lock-keywords sql-mode-ansi-font-lock-keywords 494 (defvar sql-mode-font-lock-keywords sql-mode-ansi-font-lock-keywords
495 "SQL keywords used by font-lock. 495 "SQL keywords used by font-lock.
496 496