/[emacs]/emacs/lisp/progmodes/ld-script.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/ld-script.el

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

revision 1.2 by miles, Mon Sep 1 15:45:35 2003 UTC revision 1.3 by jpw, Mon Sep 22 12:35:28 2003 UTC
# Line 5  Line 5 
5  ;; Author: Masatake YAMATO<jet@gyve.org>  ;; Author: Masatake YAMATO<jet@gyve.org>
6  ;; Keywords: languages, faces  ;; Keywords: languages, faces
7    
8    ;; This file is part of GNU Emacs.
9    
10  ;; This program is free software; you can redistribute it and/or modify  ;; This program is free software; you can redistribute it and/or modify
11  ;; it under the terms of the GNU General Public License as published by  ;; it under the terms of the GNU General Public License as published by
12  ;; the Free Software Foundation; either version 2, or (at your option)  ;; the Free Software Foundation; either version 2, or (at your option)
# Line 20  Line 22 
22  ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,  ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23  ;; Boston, MA 02111-1307, USA.  ;; Boston, MA 02111-1307, USA.
24    
25  ;;; Codes:  ;;; Commentary:
26    
27    ;; Major mode for editing GNU linker (ld) scripts.
28    
29    ;;; Code:
30    
31  ;; Custom  ;; Custom
32  (defgroup ld-script nil  (defgroup ld-script nil
# Line 35  Line 41 
41    :group 'ld-script)    :group 'ld-script)
42    
43  ;; Syntax rules  ;; Syntax rules
44  (defvar ld-script-mode-syntax-table  (defvar ld-script-mode-syntax-table
45    (let ((st (make-syntax-table)))    (let ((st (make-syntax-table)))
46      (modify-syntax-entry ?\  "-"   st)      (modify-syntax-entry ?\  "-"   st)
47      (modify-syntax-entry ?{ "(}" st)      (modify-syntax-entry ?{ "(}" st)
# Line 67  Line 73 
73    "Syntax table used while in `ld-script-mode'.")    "Syntax table used while in `ld-script-mode'.")
74    
75  ;; Font lock keywords  ;; Font lock keywords
76  (defvar ld-script-keywords  (defvar ld-script-keywords
77    '("ENTRY" "INCLUDE" "INPUT" "GROUP"    '("ENTRY" "INCLUDE" "INPUT" "GROUP"
78      "OUTPUT" "SEARCH_DIR" "STARTUP"      "OUTPUT" "SEARCH_DIR" "STARTUP"
79      "OUTPUT_FORMAT" "TARGET"      "OUTPUT_FORMAT" "TARGET"
80      "ASSERT" "EXTERN" "FORCE_COMMON_ALLOCATION" "NOCROSSREFS" "OUTPUT_ARCH"      "ASSERT" "EXTERN" "FORCE_COMMON_ALLOCATION" "NOCROSSREFS" "OUTPUT_ARCH"
81      "PROVIDE"      "PROVIDE"
82      "SECTIONS" "SORT" "COMMON" "KEEP"      "SECTIONS" "SORT" "COMMON" "KEEP"
83      "BYTE" "SHORT" "LONG" "QUAD" "SQAD"      "BYTE" "SHORT" "LONG" "QUAD" "SQAD"
84      "FILL"      "FILL"
# Line 86  Line 92 
92      "VERSION")      "VERSION")
93    "Keywords used of GNU ld script.")    "Keywords used of GNU ld script.")
94    
95  (defvar ld-script-builtins  (defvar ld-script-builtins
96    '("ABSOLUTE"    '("ABSOLUTE"
97      "ADDR"      "ADDR"
98      "ALIGN"      "ALIGN"
99      "BLOCK"      "BLOCK"
# Line 110  Line 116 
116      ("##\\|#[^#\n]+$"  . font-lock-preprocessor-face)      ("##\\|#[^#\n]+$"  . font-lock-preprocessor-face)
117      ("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face)      ("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face)
118      )      )
119    "Default font-lock-keywords for `ld-script mode'.")    "Default font-lock-keywords for `ld-script-mode'.")
120    
121  ;;;###autoload  ;;;###autoload
122  (add-to-list 'auto-mode-alist '("\\.lds" . ld-script-mode))  (add-to-list 'auto-mode-alist '("\\.lds" . ld-script-mode))
# Line 123  Line 129 
129    (set (make-local-variable 'indent-line-function) #'indent-relative)    (set (make-local-variable 'indent-line-function) #'indent-relative)
130    (set (make-local-variable 'font-lock-defaults) '(ld-script-font-lock-keywords nil)))    (set (make-local-variable 'font-lock-defaults) '(ld-script-font-lock-keywords nil)))
131    
132    (provide 'ld-script)
133    
134  ;;; arch-tag: 83280b6b-e6fc-4d00-a630-922d7aec5593  ;;; arch-tag: 83280b6b-e6fc-4d00-a630-922d7aec5593
135  ;;; ld-script.el ends here  ;;; ld-script.el ends here

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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