aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2005-04-01 21:43:47 +0000
committerJay Belanger2005-04-01 21:43:47 +0000
commit60afc271ff91a4eef0b5a9a7dbfe41c7b5b4f07e (patch)
tree35bf148ec7eb819c086db1fc7707cdab5cc6a809
parent392fe1b7258bfef56df6f32f83edef06adc1cc38 (diff)
downloademacs-60afc271ff91a4eef0b5a9a7dbfe41c7b5b4f07e.tar.gz
emacs-60afc271ff91a4eef0b5a9a7dbfe41c7b5b4f07e.zip
calc.el
(calc-settings-file, calc-language-alist): Make customizable. (calc-embedded-announce-formula, calc-embedded-open-formula) (calc-embedded-close-formula, calc-embedded-open-word) (calc-embedded-close-word, calc-embedded-open-plain) (calc-embedded-close-plain, calc-embedded-open-new-formula) (calc-embedded-close-new-formula, calc-embedded-open-mode) (calc-embedded-close-mode, calc-gnuplot-name, calc-gnuplot-plot-command) (calc-gnuplot-print-command): Move here from other files and make customizable.
-rw-r--r--lisp/calc/calc.el116
1 files changed, 114 insertions, 2 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 639b6f31a68..3d78599ecc1 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -206,9 +206,121 @@
206 206
207(require 'calc-macs) 207(require 'calc-macs)
208 208
209(defgroup calc nil
210 "GNU Calc"
211 :prefix "calc-"
212 :tag "Calc")
213
209;;;###autoload 214;;;###autoload
210(defvar calc-settings-file (convert-standard-filename "~/.calc.el") 215(defcustom calc-settings-file
211 "*File in which to record permanent settings.") 216 (convert-standard-filename "~/.calc.el")
217 "*File in which to record permanent settings."
218 :group 'calc
219 :type '(file))
220
221(defcustom calc-language-alist
222 '((latex-mode . latex)
223 (tex-mode . tex)
224 (plain-tex-mode . tex)
225 (context-mode . tex)
226 (nroff-mode . eqn)
227 (pascal-mode . pascal)
228 (c-mode . c)
229 (c++-mode . c)
230 (fortran-mode . fortran)
231 (f90-mode . fortran))
232 "*Alist of major modes with appropriate Calc languages."
233 :group 'calc
234 :type '(alist :key-type symbol :value-type symbol))
235
236(defcustom calc-embedded-announce-formula
237 "%Embed\n\\(% .*\n\\)*"
238 "*A regular expression which is sure to be followed by a calc-embedded formula."
239 :group 'calc
240 :type '(regexp))
241
242(defcustom calc-embedded-open-formula
243 "\\`\\|^\n\\|\\$\\$?\\|\\\\\\[\\|^\\\\begin[^{].*\n\\|^\\\\begin{.*[^x]}.*\n\\|^@.*\n\\|^\\.EQ.*\n\\|\\\\(\\|^%\n\\|^\\.\\\\\"\n"
244 "*A regular expression for the opening delimiter of a formula used by calc-embedded."
245 :group 'calc
246 :type '(regexp))
247
248(defcustom calc-embedded-close-formula
249 "\\'\\|\n$\\|\\$\\$?\\|\\\\]\\|^\\\\end[^{].*\n\\|^\\\\end{.*[^x]}.*\n\\|^@.*\n\\|^\\.EN.*\n\\|\\\\)\\|\n%\n\\|^\\.\\\\\"\n"
250 "*A regular expression for the closing delimiter of a formula used by calc-embedded."
251 :group 'calc
252 :type '(regexp))
253
254(defcustom calc-embedded-open-word
255 "^\\|[^-+0-9.eE]"
256 "*A regular expression for the opening delimiter of a formula used by calc-embedded-word."
257 :group 'calc
258 :type '(regexp))
259
260(defcustom calc-embedded-close-word
261 "$\\|[^-+0-9.eE]"
262 "*A regular expression for the closing delimiter of a formula used by calc-embedded-word."
263 :group 'calc
264 :type '(regexp))
265
266(defcustom calc-embedded-open-plain
267 "%%% "
268 "*A string which is the opening delimiter for a \"plain\" formula.
269If calc-show-plain mode is enabled, this is inserted at the front of
270each formula."
271 :group 'calc
272 :type '(string))
273
274(defcustom calc-embedded-close-plain
275 " %%%\n"
276 "*A string which is the closing delimiter for a \"plain\" formula.
277See calc-embedded-open-plain."
278 :group 'calc
279 :type '(string))
280
281(defcustom calc-embedded-open-new-formula
282 "\n\n"
283 "*A string which is inserted at front of formula by calc-embedded-new-formula."
284 :group 'calc
285 :type '(string))
286
287(defcustom calc-embedded-close-new-formula
288 "\n\n"
289 "*A string which is inserted at end of formula by calc-embedded-new-formula."
290 :group 'calc
291 :type '(string))
292
293(defcustom calc-embedded-open-mode
294 "% "
295 "*A string which should precede calc-embedded mode annotations.
296This is not required to be present for user-written mode annotations."
297 :group 'calc
298 :type '(string))
299
300(defcustom calc-embedded-close-mode
301 "\n"
302 "*A string which should follow calc-embedded mode annotations.
303This is not required to be present for user-written mode annotations."
304 :group 'calc
305 :type '(string))
306
307(defcustom calc-gnuplot-name
308 "gnuplot"
309 "*Name of GNUPLOT program, for calc-graph features."
310 :group 'calc
311 :type '(string))
312
313(defcustom calc-gnuplot-plot-command
314 nil
315 "*Name of command for displaying GNUPLOT output; %s = file name to print."
316 :group 'calc
317 :type '(choice (string) (sexp)))
318
319(defcustom calc-gnuplot-print-command
320 "lp %s"
321 "*Name of command for printing GNUPLOT output; %s = file name to print."
322 :group 'calc
323 :type '(choice (string) (sexp)))
212 324
213(defvar calc-bug-address "belanger@truman.edu" 325(defvar calc-bug-address "belanger@truman.edu"
214 "Address of the author of Calc, for use by `report-calc-bug'.") 326 "Address of the author of Calc, for use by `report-calc-bug'.")