aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-01-21 04:43:45 +0000
committerRichard M. Stallman1997-01-21 04:43:45 +0000
commite7017ef969390a58ba1ae53894804ed6755eced1 (patch)
tree9e518e8130b5129f0cdabbfe43c4f9c2b5f1c1bd
parent7c1b57782a5cc6558245d0508c8ec5f07174754f (diff)
downloademacs-e7017ef969390a58ba1ae53894804ed6755eced1.tar.gz
emacs-e7017ef969390a58ba1ae53894804ed6755eced1.zip
Delete explicit autoload calls.
Provide octave-mod. Move the variables formerly in octave.el to the top of the file.
-rw-r--r--lisp/progmodes/octave-mod.el284
1 files changed, 138 insertions, 146 deletions
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index ab08b0e4718..ff27f06fd5f 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -41,6 +41,143 @@
41 41
42;;; Code: 42;;; Code:
43 43
44(defconst octave-maintainer-address
45 "Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>, bug-gnu-emacs@prep.ai.mit.edu"
46 "Current maintainer of the Emacs Octave package.")
47
48(defvar octave-abbrev-table nil
49 "Abbrev table for Octave's reserved words.
50Used in octave-mode and inferior-octave-mode buffers.
51All Octave abbrevs start with a grave accent (`).")
52(if octave-abbrev-table
53 ()
54 (let ((ac abbrevs-changed))
55 (define-abbrev-table 'octave-abbrev-table ())
56 (define-abbrev octave-abbrev-table "`a" "all_va_args" nil)
57 (define-abbrev octave-abbrev-table "`b" "break" nil)
58 (define-abbrev octave-abbrev-table "`ca" "catch" nil)
59 (define-abbrev octave-abbrev-table "`c" "continue" nil)
60 (define-abbrev octave-abbrev-table "`el" "else" nil)
61 (define-abbrev octave-abbrev-table "`eli" "elseif" nil)
62 (define-abbrev octave-abbrev-table "`et" "end_try_catch" nil)
63 (define-abbrev octave-abbrev-table "`eu" "end_unwind_protect" nil)
64 (define-abbrev octave-abbrev-table "`ef" "endfor" nil)
65 (define-abbrev octave-abbrev-table "`efu" "endfunction" nil)
66 (define-abbrev octave-abbrev-table "`ei" "endif" nil)
67 (define-abbrev octave-abbrev-table "`ew" "endwhile" nil)
68 (define-abbrev octave-abbrev-table "`f" "for" nil)
69 (define-abbrev octave-abbrev-table "`fu" "function" nil)
70 (define-abbrev octave-abbrev-table "`gl" "global" nil)
71 (define-abbrev octave-abbrev-table "`gp" "gplot" nil)
72 (define-abbrev octave-abbrev-table "`gs" "gsplot" nil)
73 (define-abbrev octave-abbrev-table "`if" "if ()" nil)
74 (define-abbrev octave-abbrev-table "`rp" "replot" nil)
75 (define-abbrev octave-abbrev-table "`r" "return" nil)
76 (define-abbrev octave-abbrev-table "`t" "try" nil)
77 (define-abbrev octave-abbrev-table "`up" "unwind_protect" nil)
78 (define-abbrev octave-abbrev-table "`upc" "unwind_protect_cleanup" nil)
79 (define-abbrev octave-abbrev-table "`w" "while ()" nil)
80 (setq abbrevs-changed ac)))
81
82(defvar octave-comment-char ?#
83 "Character to start an Octave comment.")
84(defvar octave-comment-start
85 (concat (make-string 1 octave-comment-char) " ")
86 "String to insert to start a new Octave in-line comment.")
87(defvar octave-comment-start-skip "\\s<+\\s-*"
88 "Regexp to match the start of an Octave comment up to its body.")
89
90(defvar octave-begin-keywords
91 '("for" "function" "if" "try" "unwind_protect" "while"))
92(defvar octave-else-keywords
93 '("catch" "else" "elseif" "unwind_protect_cleanup"))
94(defvar octave-end-keywords
95 '("end" "endfor" "endfunction" "endif" "end_try_catch"
96 "end_unwind_protect" "endwhile"))
97
98(defvar octave-reserved-words
99 (append octave-begin-keywords octave-else-keywords octave-end-keywords
100 '("all_va_args" "break" "continue" "global" "gplot" "gsplot"
101 "replot" "return"))
102 "Reserved words in Octave.")
103
104(defvar octave-text-functions
105 '("casesen" "cd" "chdir" "clear" "diary" "dir" "document" "echo"
106 "edit_history" "format" "gset" "gshow" "help" "history" "hold"
107 "load" "ls" "more" "run_history" "save" "set" "show" "type"
108 "which" "who" "whos")
109 "Text functions in Octave (these names are also reserved).")
110
111(defvar octave-variables
112 '("EDITOR" "EXEC_PATH" "F_DUPFD" "F_GETFD" "F_GETFL" "F_SETFD"
113 "F_SETFL" "I" "IMAGEPATH" "INFO_FILE" "INFO_PROGRAM" "Inf" "J"
114 "LOADPATH" "NaN" "OCTAVE_VERSION" "O_APPEND" "O_CREAT" "O_EXCL"
115 "O_NONBLOCK" "O_RDONLY" "O_RDWR" "O_TRUNC" "O_WRONLY" "PAGER" "PS1"
116 "PS2" "PS4" "PWD" "SEEK_CUR" "SEEK_END" "SEEK_SET" "__F_DUPFD__"
117 "__F_GETFD__" "__F_GETFL__" "__F_SETFD__" "__F_SETFL__" "__I__"
118 "__Inf__" "__J__" "__NaN__" "__OCTAVE_VERSION__" "__O_APPEND__"
119 "__O_CREAT__" "__O_EXCL__" "__O_NONBLOCK__" "__O_RDONLY__"
120 "__O_RDWR__" "__O_TRUNC__" "__O_WRONLY__" "__PWD__" "__SEEK_CUR__"
121 "__SEEK_END__" "__SEEK_SET__" "__argv__" "__e__" "__eps__"
122 "__error_text__" "__i__" "__inf__" "__j__" "__nan__" "__pi__"
123 "__program_invocation_name__" "__program_name__" "__realmax__"
124 "__realmin__" "__stderr__" "__stdin__" "__stdout__" "ans" "argv"
125 "automatic_replot" "beep_on_error" "completion_append_char"
126 "default_return_value" "default_save_format"
127 "define_all_return_values" "do_fortran_indexing" "e"
128 "echo_executing_commands" "empty_list_elements_ok" "eps"
129 "error_text" "gnuplot_binary" "gnuplot_has_multiplot" "history_file"
130 "history_size" "ignore_function_time_stamp" "implicit_str_to_num_ok"
131 "inf" "nan" "nargin" "ok_to_lose_imaginary_part"
132 "output_max_field_width" "output_precision"
133 "page_output_immediately" "page_screen_output" "pi"
134 "prefer_column_vectors" "prefer_zero_one_indexing"
135 "print_answer_id_name" "print_empty_dimensions"
136 "program_invocation_name" "program_name" "propagate_empty_matrices"
137 "realmax" "realmin" "resize_on_range_error"
138 "return_last_computed_value" "save_precision" "saving_history"
139 "silent_functions" "split_long_rows" "stderr" "stdin" "stdout"
140 "string_fill_char" "struct_levels_to_print"
141 "suppress_verbose_help_message" "treat_neg_dim_as_zero"
142 "warn_assign_as_truth_value" "warn_comma_in_global_decl"
143 "warn_divide_by_zero" "warn_function_name_clash"
144 "warn_missing_semicolon" "whitespace_in_literal_matrix")
145 "Builtin variables in Octave.")
146
147(defvar octave-function-header-regexp
148 (concat "^\\s-*\\<\\(function\\)\\>"
149 "\\([^=;\n]*=[ \t]*\\|[ \t]*\\)\\(\\w+\\)\\>")
150 "Regexp to match an Octave function header.
151The string `function' and its name are given by the first and third
152parenthetical grouping.")
153
154(defvar octave-font-lock-keywords
155 (list
156 ;; Fontify all builtin keywords.
157 (cons (concat "\\<\\("
158 (mapconcat 'identity octave-reserved-words "\\|")
159 (mapconcat 'identity octave-text-functions "\\|")
160 "\\)\\>")
161 'font-lock-keyword-face)
162 ;; Fontify all builtin operators.
163 (cons "\\(&\\||\\|<=\\|>=\\|==\\|<\\|>\\|!=\\|!\\)"
164 'font-lock-reference-face)
165 ;; Fontify all builtin variables.
166 (cons (concat "\\<\\("
167 (mapconcat 'identity octave-variables "\\|")
168 "\\)\\>")
169 'font-lock-variable-name-face)
170 ;; Fontify all function declarations.
171 (list octave-function-header-regexp
172 '(1 font-lock-keyword-face)
173 '(3 font-lock-function-name-face nil t)))
174 "Additional Octave expressions to highlight.")
175
176(defvar inferior-octave-buffer "*Inferior Octave*"
177 "*Name of buffer for running an inferior Octave process.")
178
179(defvar inferior-octave-process nil)
180
44(defvar octave-mode-map nil 181(defvar octave-mode-map nil
45 "Keymap used in Octave mode.") 182 "Keymap used in Octave mode.")
46(if octave-mode-map 183(if octave-mode-map
@@ -1228,151 +1365,6 @@ code line."
1228 (mapconcat 'identity inferior-octave-output-list "\n"))) 1365 (mapconcat 'identity inferior-octave-output-list "\n")))
1229 (terpri))) 1366 (terpri)))
1230 1367
1231(defconst octave-maintainer-address
1232 "Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>, bug-gnu-emacs@prep.ai.mit.edu"
1233 "Current maintainer of the Emacs Octave package.")
1234
1235(defvar octave-abbrev-table nil
1236 "Abbrev table for Octave's reserved words.
1237Used in octave-mode and inferior-octave-mode buffers.
1238All Octave abbrevs start with a grave accent (`).")
1239(if octave-abbrev-table
1240 ()
1241 (let ((ac abbrevs-changed))
1242 (define-abbrev-table 'octave-abbrev-table ())
1243 (define-abbrev octave-abbrev-table "`a" "all_va_args" nil)
1244 (define-abbrev octave-abbrev-table "`b" "break" nil)
1245 (define-abbrev octave-abbrev-table "`ca" "catch" nil)
1246 (define-abbrev octave-abbrev-table "`c" "continue" nil)
1247 (define-abbrev octave-abbrev-table "`el" "else" nil)
1248 (define-abbrev octave-abbrev-table "`eli" "elseif" nil)
1249 (define-abbrev octave-abbrev-table "`et" "end_try_catch" nil)
1250 (define-abbrev octave-abbrev-table "`eu" "end_unwind_protect" nil)
1251 (define-abbrev octave-abbrev-table "`ef" "endfor" nil)
1252 (define-abbrev octave-abbrev-table "`efu" "endfunction" nil)
1253 (define-abbrev octave-abbrev-table "`ei" "endif" nil)
1254 (define-abbrev octave-abbrev-table "`ew" "endwhile" nil)
1255 (define-abbrev octave-abbrev-table "`f" "for" nil)
1256 (define-abbrev octave-abbrev-table "`fu" "function" nil)
1257 (define-abbrev octave-abbrev-table "`gl" "global" nil)
1258 (define-abbrev octave-abbrev-table "`gp" "gplot" nil)
1259 (define-abbrev octave-abbrev-table "`gs" "gsplot" nil)
1260 (define-abbrev octave-abbrev-table "`if" "if ()" nil)
1261 (define-abbrev octave-abbrev-table "`rp" "replot" nil)
1262 (define-abbrev octave-abbrev-table "`r" "return" nil)
1263 (define-abbrev octave-abbrev-table "`t" "try" nil)
1264 (define-abbrev octave-abbrev-table "`up" "unwind_protect" nil)
1265 (define-abbrev octave-abbrev-table "`upc" "unwind_protect_cleanup" nil)
1266 (define-abbrev octave-abbrev-table "`w" "while ()" nil)
1267 (setq abbrevs-changed ac)))
1268
1269(defvar octave-comment-char ?#
1270 "Character to start an Octave comment.")
1271(defvar octave-comment-start
1272 (concat (make-string 1 octave-comment-char) " ")
1273 "String to insert to start a new Octave in-line comment.")
1274(defvar octave-comment-start-skip "\\s<+\\s-*"
1275 "Regexp to match the start of an Octave comment up to its body.")
1276
1277(defvar octave-begin-keywords
1278 '("for" "function" "if" "try" "unwind_protect" "while"))
1279(defvar octave-else-keywords
1280 '("catch" "else" "elseif" "unwind_protect_cleanup"))
1281(defvar octave-end-keywords
1282 '("end" "endfor" "endfunction" "endif" "end_try_catch"
1283 "end_unwind_protect" "endwhile"))
1284
1285(defvar octave-reserved-words
1286 (append octave-begin-keywords octave-else-keywords octave-end-keywords
1287 '("all_va_args" "break" "continue" "global" "gplot" "gsplot"
1288 "replot" "return"))
1289 "Reserved words in Octave.")
1290
1291(defvar octave-text-functions
1292 '("casesen" "cd" "chdir" "clear" "diary" "dir" "document" "echo"
1293 "edit_history" "format" "gset" "gshow" "help" "history" "hold"
1294 "load" "ls" "more" "run_history" "save" "set" "show" "type"
1295 "which" "who" "whos")
1296 "Text functions in Octave (these names are also reserved).")
1297
1298(defvar octave-variables
1299 '("EDITOR" "EXEC_PATH" "F_DUPFD" "F_GETFD" "F_GETFL" "F_SETFD"
1300 "F_SETFL" "I" "IMAGEPATH" "INFO_FILE" "INFO_PROGRAM" "Inf" "J"
1301 "LOADPATH" "NaN" "OCTAVE_VERSION" "O_APPEND" "O_CREAT" "O_EXCL"
1302 "O_NONBLOCK" "O_RDONLY" "O_RDWR" "O_TRUNC" "O_WRONLY" "PAGER" "PS1"
1303 "PS2" "PS4" "PWD" "SEEK_CUR" "SEEK_END" "SEEK_SET" "__F_DUPFD__"
1304 "__F_GETFD__" "__F_GETFL__" "__F_SETFD__" "__F_SETFL__" "__I__"
1305 "__Inf__" "__J__" "__NaN__" "__OCTAVE_VERSION__" "__O_APPEND__"
1306 "__O_CREAT__" "__O_EXCL__" "__O_NONBLOCK__" "__O_RDONLY__"
1307 "__O_RDWR__" "__O_TRUNC__" "__O_WRONLY__" "__PWD__" "__SEEK_CUR__"
1308 "__SEEK_END__" "__SEEK_SET__" "__argv__" "__e__" "__eps__"
1309 "__error_text__" "__i__" "__inf__" "__j__" "__nan__" "__pi__"
1310 "__program_invocation_name__" "__program_name__" "__realmax__"
1311 "__realmin__" "__stderr__" "__stdin__" "__stdout__" "ans" "argv"
1312 "automatic_replot" "beep_on_error" "completion_append_char"
1313 "default_return_value" "default_save_format"
1314 "define_all_return_values" "do_fortran_indexing" "e"
1315 "echo_executing_commands" "empty_list_elements_ok" "eps"
1316 "error_text" "gnuplot_binary" "gnuplot_has_multiplot" "history_file"
1317 "history_size" "ignore_function_time_stamp" "implicit_str_to_num_ok"
1318 "inf" "nan" "nargin" "ok_to_lose_imaginary_part"
1319 "output_max_field_width" "output_precision"
1320 "page_output_immediately" "page_screen_output" "pi"
1321 "prefer_column_vectors" "prefer_zero_one_indexing"
1322 "print_answer_id_name" "print_empty_dimensions"
1323 "program_invocation_name" "program_name" "propagate_empty_matrices"
1324 "realmax" "realmin" "resize_on_range_error"
1325 "return_last_computed_value" "save_precision" "saving_history"
1326 "silent_functions" "split_long_rows" "stderr" "stdin" "stdout"
1327 "string_fill_char" "struct_levels_to_print"
1328 "suppress_verbose_help_message" "treat_neg_dim_as_zero"
1329 "warn_assign_as_truth_value" "warn_comma_in_global_decl"
1330 "warn_divide_by_zero" "warn_function_name_clash"
1331 "warn_missing_semicolon" "whitespace_in_literal_matrix")
1332 "Builtin variables in Octave.")
1333
1334(defvar octave-function-header-regexp
1335 (concat "^\\s-*\\<\\(function\\)\\>"
1336 "\\([^=;\n]*=[ \t]*\\|[ \t]*\\)\\(\\w+\\)\\>")
1337 "Regexp to match an Octave function header.
1338The string `function' and its name are given by the first and third
1339parenthetical grouping.")
1340
1341(defvar octave-font-lock-keywords
1342 (list
1343 ;; Fontify all builtin keywords.
1344 (cons (concat "\\<\\("
1345 (mapconcat 'identity octave-reserved-words "\\|")
1346 (mapconcat 'identity octave-text-functions "\\|")
1347 "\\)\\>")
1348 'font-lock-keyword-face)
1349 ;; Fontify all builtin operators.
1350 (cons "\\(&\\||\\|<=\\|>=\\|==\\|<\\|>\\|!=\\|!\\)"
1351 'font-lock-reference-face)
1352 ;; Fontify all builtin variables.
1353 (cons (concat "\\<\\("
1354 (mapconcat 'identity octave-variables "\\|")
1355 "\\)\\>")
1356 'font-lock-variable-name-face)
1357 ;; Fontify all function declarations.
1358 (list octave-function-header-regexp
1359 '(1 font-lock-keyword-face)
1360 '(3 font-lock-function-name-face nil t)))
1361 "Additional Octave expressions to highlight.")
1362
1363(defvar inferior-octave-buffer "*Inferior Octave*"
1364 "*Name of buffer for running an inferior Octave process.")
1365
1366(defvar inferior-octave-process nil)
1367
1368
1369;;; Autoloads
1370(autoload 'octave-mode "octave-mod" nil t)
1371(autoload 'octave-help "octave-hlp" nil t)
1372(autoload 'inferior-octave "octave-inf" nil t)
1373(autoload 'run-octave "octave-inf" nil t)
1374
1375
1376;;; Bug reporting 1368;;; Bug reporting
1377(defun octave-submit-bug-report () 1369(defun octave-submit-bug-report ()
1378 "Submit a bug report on the Emacs Octave package via mail." 1370 "Submit a bug report on the Emacs Octave package via mail."
@@ -1398,6 +1390,6 @@ parenthetical grouping.")
1398 1390
1399;;; provide ourself 1391;;; provide ourself
1400 1392
1401(provide 'octave) 1393(provide 'octave-mod)
1402 1394
1403;;; octave-mod.el ends here 1395;;; octave-mod.el ends here