From 91337c1f284640ec0de4f1e84c63b61a39706856 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 7 Nov 2004 20:52:25 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6fc7796f339..a6bd8eff210 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2004-11-07 Juri Linkov + + * info-look.el (info-lookup): Allow reusing in the current buffer + not only *info* buffer, but all (even renamed) Info buffers + by checking for major-mode instead of *info* buffer name. + (c-mode, autoconf-mode, emacs-lisp-mode, scheme-mode) + (octave-mode, maxima-mode) : + Allow long dashes generated by Texinfo 4.7 before definitions. + (texinfo-mode) : Add space to suffix to find command + definitions with argument separated by space. + 2004-11-06 Kai Grossjohann * net/tramp.el (tramp-coding-commands): Additionally try "uudecode -- cgit v1.3 From 551373ea9813572e8cb777b3f30a89b4471166ad Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 7 Nov 2004 22:51:22 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6bd8eff210..8cb09788097 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -9,6 +9,46 @@ (texinfo-mode) : Add space to suffix to find command definitions with argument separated by space. +2004-11-06 Richard M. Stallman + + * simple.el (next-error group, face): Move before first use. + (next-error-highlight, next-error-highlight-no-select): Likewise. + (line-move-invisible-p): Renamed from line-move-invisible. + (line-move): New args NOERROR and TO-END. + Return t if if succeed in moving specified number of lines. + (move-end-of-line): New function. + (beginning-of-buffer-other-window, end-of-buffer-other-window): + Use with-no-warnings. + + * simple.el (line-move-ignore-invisible): Default to t. + + * subr.el (syntax-after): Return the syntax letter, not the raw code. + + * emacs-lisp/elp.el (elp-results): Delete wasteful beginning-of-buffer. + + * international/iso-cvt.el (iso-cvt-define-menu): + menu-bar-files-menu renamed to menu-bar-file-menu. + + * net/browse-url.el (browse-url-gnome-moz-program) + (browse-url-gnome-moz-arguments): Move up before first use. + + * net/tramp.el (tramp group): Add :version. + + * progmodes/ada-xref.el (ada-gdb-application): + Use goto-char instead of beginning-of-buffer. + + * progmodes/cperl-mode.el (cperl-info-on-command): + Use goto-char instead of beginning-of-buffer. + + * progmodes/idlw-shell.el (idlwave-shell-examine-map): + Move up before first use. + (idlwave-shell-temp-pro-file): Likewise. + (idlwave-shell-temp-rinfo-save-file): Likewise. + (idlwave-shell-temp-file): Minor doc fix. + + * textmodes/flyspell.el (flyspell-external-point-words): + Use goto-char instead of beginning-of-buffer. + 2004-11-06 Kai Grossjohann * net/tramp.el (tramp-coding-commands): Additionally try "uudecode -- cgit v1.3 From 85c385423e88cbb45842dd8cb1c083312a951050 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 7 Nov 2004 23:27:02 +0000 Subject: *** empty log message *** --- ChangeLog | 7 +++++++ lisp/ChangeLog | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/ChangeLog b/ChangeLog index 8fbd47889c3..9bd823ee5e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-11-08 Kim F. Storm + + * Makefile.in (bootstrap, bootstrap-clean-before): Remove .elc + files before building. + (bootfast, bootstrap-clean-before-fast): New targets, like + bootstrap but don't remove .elc files. + 2004-11-06 Lars Brinkhoff * configure.in: Add check for getrusage. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8cb09788097..2416aeb0415 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-11-08 Kim F. Storm + + * Makefile.in (bootstrap-clean): New target for 'make bootstrap'. + 2004-11-07 Juri Linkov * info-look.el (info-lookup): Allow reusing in the current buffer -- cgit v1.3 From bd6bda79c3231b44165a0ca865ac532f4cde1f29 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 8 Nov 2004 00:27:05 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2416aeb0415..e7b6826c212 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2004-11-08 Jay Belanger + + * calc/calcalg2.el (math-linear-subst-tried): New variable. + (math-do-integral): Set `math-linear-subst-tried' to nil. + (math-do-integral-methods): Use `math-linear-subst-tried' to + determine what type of substitution to try. + (math-integ-try-linear-substituion): Set + `math-linear-subst-tried' to t. + 2004-11-08 Kim F. Storm * Makefile.in (bootstrap-clean): New target for 'make bootstrap'. -- cgit v1.3 From 3c29dab149b9a9970f283be0e03428961079e938 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 8 Nov 2004 02:37:02 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e7b6826c212..a8db6e9a693 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-08 Jay Belanger + + * calc/calcalg2.el (math-do-integral-methods): Try linear then + non-linear substitutions. + 2004-11-08 Jay Belanger * calc/calcalg2.el (math-linear-subst-tried): New variable. -- cgit v1.3 From b056d9cbd7a9a00e52e0f552e7a4c81aee82dcac Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 8 Nov 2004 12:18:33 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8db6e9a693..ca644d9ec6a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-08 Juri Linkov + + * progmodes/compile.el (compile): Don't overwrite last command in + minibuffer history with default command if they are not equal. + 2004-11-08 Jay Belanger * calc/calcalg2.el (math-do-integral-methods): Try linear then -- cgit v1.3 From 1efc19ebfa52ff89bf07c2a8aebb92c4deef0a36 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 8 Nov 2004 17:00:42 +0000 Subject: *** empty log message *** --- admin/FOR-RELEASE | 9 ++++++--- etc/NEWS | 4 +++- lisp/ChangeLog | 25 ++++++++++++++++++++++--- lispref/ChangeLog | 4 ++++ 4 files changed, 35 insertions(+), 7 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index e5e719f9037..99f78af4e25 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -10,6 +10,8 @@ Tasks needed before the next release. ** Let mouse-1 follow links. +** Make Rmail find the best version of movemail. +To be done by Sergey Poznyakoff . * FATAL ERRORS @@ -30,7 +32,6 @@ invalid pointer from string_free_list. ** Clean up flymake.el to follow Emacs Lisp conventions. - * GTK RELATED BUGS ** Make GTK scrollbars behave like others w.r.t. overscrolling. @@ -244,6 +245,8 @@ Electric-pop-up-window can use it. * DOCUMENTATION +** Document Custom Themes. + ** Finish updating the Emacs Lisp manual. ** Update the Emacs manual. @@ -318,11 +321,11 @@ names of the people who have checked it. SECTION READERS ---------------------------------- lispref/abbrevs.texi "Luc Teirlinck" -lispref/advice.texi +lispref/advice.texi Joakim Verona lispref/anti.texi lispref/backups.texi "Luc Teirlinck" lispref/buffers.texi "Luc Teirlinck" -lispref/calendar.texi +lispref/calendar.texi Joakim Verona lispref/commands.texi "Luc Teirlinck" lispref/compile.texi "Luc Teirlinck" lispref/control.texi "Luc Teirlinck" diff --git a/etc/NEWS b/etc/NEWS index 84a2728fcf0..d44e56ac860 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2331,7 +2331,9 @@ configuration files. ** The new function syntax-after returns the syntax code of the character after a specified buffer position, taking account of text properties as well as the character code. -It returns the value compatibly with char-syntax. +It returns the value compatibly with char-syntax, except +that the value can be a list (SYNTAX . MATCHER) which says +what the matching character is. +++ ** The new primitive `get-internal-run-time' returns the processor diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca644d9ec6a..cce61c85b87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2004-11-08 Richard M. Stallman + + * subr.el (syntax-after): Doc fix. + + * paren.el (show-paren-function): Change calls to syntax-after + for new way of returning the value. + + * menu-bar.el (menu-bar-file-menu): Make this the real name + and menu-bar-files-menu the alias. Use the former. + (global-map): Use `file', not `files', as the symbol. + + * info.el (Info-revert-find-node): Don't use beginning-of-buffer. + + * filesets.el (filesets-spawn-external-viewer, filesets-run-cmd): + Don't use beginning-of-buffer. + (filesets-cmd-show-result): Use with-no-warnings. + 2004-11-08 Juri Linkov * progmodes/compile.el (compile): Don't overwrite last command in @@ -36,12 +53,14 @@ * simple.el (next-error group, face): Move before first use. (next-error-highlight, next-error-highlight-no-select): Likewise. - (line-move-invisible-p): Renamed from line-move-invisible. + + * simple.el (line-move-invisible-p): Renamed from line-move-invisible. (line-move): New args NOERROR and TO-END. Return t if if succeed in moving specified number of lines. (move-end-of-line): New function. - (beginning-of-buffer-other-window, end-of-buffer-other-window): - Use with-no-warnings. + + * simple.el (beginning-of-buffer-other-window): Use with-no-warnings. + (end-of-buffer-other-window): Likewise. * simple.el (line-move-ignore-invisible): Default to t. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 197c7217785..4491956f06f 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2004-11-08 Richard M. Stallman + + * syntax.texi (Syntax Table Functions): Add syntax-after. + 2004-11-06 Lars Brinkhoff * os.texi (Processor Run Time): New section documenting -- cgit v1.3 From ec3dd7523b6bc6b2f1fb23913f0a3fc84f74ec01 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 8 Nov 2004 21:15:50 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cce61c85b87..839af121da9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-11-09 Nick Roberts + + * progmodes/gdb-ui.el (gdb-current-stack-level): New variable. + (gdb-info-frames-custom, gdb-frame-handler): Use it to find + current frame (in case of recursive calls). + (gdb-show-changed-values): Add :version keyword. + 2004-11-08 Richard M. Stallman * subr.el (syntax-after): Doc fix. -- cgit v1.3 From 6b644e8d6ce96f8a27c162f4375c1d1646c736fb Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 9 Nov 2004 05:01:55 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 839af121da9..767b00eae77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2004-11-09 Jay Belanger + + * calc/calc.el (calc-mode-hook, calc-trail-mode-hook) + (calc-start-hook, calc-end-hook, calc-load-hook): New variables. + + * calc/calc.el (calc, calc-trail-display, calc-mode): Removed + obsolete sections. + + * calc/calc.el (calc-x-paste-text): Removed. + + * calc/calc-ext.el (calc-init-extensions): Bound calc-yank to + mouse-2. + 2004-11-09 Nick Roberts * progmodes/gdb-ui.el (gdb-current-stack-level): New variable. -- cgit v1.3 From 84c2fd9f350c15f5f742646bd3480be7e6988230 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Tue, 9 Nov 2004 08:20:44 +0000 Subject: * help-fns.el (help-C-file-name): File name must be in build-files to be returned. --- lisp/ChangeLog | 5 +++++ lisp/help-fns.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 767b00eae77..90dcebcc23e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-09 Jan Dj,Ad(Brv + + * help-fns.el (help-C-file-name): File name must be in build-files + to be returned. + 2004-11-09 Jay Belanger * calc/calc.el (calc-mode-hook, calc-trail-mode-hook) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 8f2a1b7fa6e..c06a7b1ee73 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -228,9 +228,14 @@ KIND should be `var' for a variable or `subr' for a subroutine." (if (eobp) (insert-file-contents-literally (expand-file-name internal-doc-file-name doc-directory))) - (search-forward (concat "" name "\n")) + (let ((file (catch 'loop + (while t + (let ((pnt (search-forward (concat "" name "\n")))) (re-search-backward "S\\(.*\\)") (let ((file (match-string 1))) + (if (member file build-files) + (throw 'loop file) + (goto-char pnt)))))))) (if (string-match "\\.\\(o\\|obj\\)\\'" file) (setq file (replace-match ".c" t t file))) (if (string-match "\\.c\\'" file) -- cgit v1.3 From a7a7ddf104818c610cfb7cf4674dcd9ab8c39a58 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 9 Nov 2004 10:33:23 +0000 Subject: (byte-compile-defalias): Turn off warnings for the new function even ifdefinition not constant. If the definition isn't a quoted symbol, record (FUNCTION . t). (byte-compile-function-environment): Now allow (FUNCTION . t) as elt. (byte-compile-callargs-warn): Handle (FUNCTION . t). (display-call-tree, byte-compile-arglist-warn): Handle t returned by byte-compile-fdefinition. --- lisp/ChangeLog | 10 ++++++++++ lisp/emacs-lisp/bytecomp.el | 32 +++++++++++++++++++------------- 2 files changed, 29 insertions(+), 13 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 90dcebcc23e..116eea6e848 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2004-11-09 Richard M. Stallman + + * emacs-lisp/bytecomp.el (byte-compile-defalias): + Turn off warnings for the new function even if definition not constant. + If the definition isn't a quoted symbol, record (FUNCTION . t). + (byte-compile-function-environment): Now allow (FUNCTION . t) as elt. + (byte-compile-callargs-warn): Handle (FUNCTION . t). + (display-call-tree, byte-compile-arglist-warn): + Handle t returned by byte-compile-fdefinition. + 2004-11-09 Jan Dj,Ad(Brv * help-fns.el (help-C-file-name): File name must be in build-files diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2116cc33b34..cb34b818107 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -447,7 +447,9 @@ Each element looks like (MACRONAME . DEFINITION). It is "Alist of functions defined in the file being compiled. This is so we can inline them when necessary. Each element looks like (FUNCTIONNAME . DEFINITION). It is -\(FUNCTIONNAME . nil) when a function is redefined as a macro.") +\(FUNCTIONNAME . nil) when a function is redefined as a macro. +It is \(FUNCTIONNAME . t) when all we know is that it was defined, +and we don't know the definition.") (defvar byte-compile-unresolved-functions nil "Alist of undefined functions to which calls have been compiled. @@ -1103,6 +1105,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." ;;; sanity-checking arglists +;; If a function has an entry saying (FUNCTION . t). +;; that means we know it is defined but we don't know how. +;; If a function has an entry saying (FUNCTION . nil), +;; that means treat it as not defined. (defun byte-compile-fdefinition (name macro-p) (let* ((list (if macro-p byte-compile-macro-environment @@ -1168,7 +1174,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (defun byte-compile-callargs-warn (form) (let* ((def (or (byte-compile-fdefinition (car form) nil) (byte-compile-fdefinition (car form) t))) - (sig (if def + (sig (if (and def (not (eq def t))) (byte-compile-arglist-signature (if (eq 'lambda (car-safe def)) (nth 1 def) @@ -1198,7 +1204,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (byte-compile-format-warn form) ;; Check to see if the function will be available at runtime ;; and/or remember its arity if it's unknown. - (or (and (or sig (fboundp (car form))) ; might be a subr or autoload. + (or (and (or def (fboundp (car form))) ; might be a subr or autoload. (not (memq (car form) byte-compile-noruntime-functions))) (eq (car form) byte-compile-current-form) ; ## this doesn't work ; with recursion. @@ -1243,7 +1249,7 @@ extra args." ;; number of arguments. (defun byte-compile-arglist-warn (form macrop) (let ((old (byte-compile-fdefinition (nth 1 form) macrop))) - (if old + (if (and old (not (eq old t))) (let ((sig1 (byte-compile-arglist-signature (if (eq 'lambda (car-safe old)) (nth 1 old) @@ -3714,17 +3720,17 @@ being undefined will be suppressed." (if (and (consp (cdr form)) (consp (nth 1 form)) (eq (car (nth 1 form)) 'quote) (consp (cdr (nth 1 form))) - (symbolp (nth 1 (nth 1 form))) - (consp (nthcdr 2 form)) - (consp (nth 2 form)) - (eq (car (nth 2 form)) 'quote) - (consp (cdr (nth 2 form))) - (symbolp (nth 1 (nth 2 form)))) - (progn + (symbolp (nth 1 (nth 1 form)))) + (let ((constant + (and (consp (nthcdr 2 form)) + (consp (nth 2 form)) + (eq (car (nth 2 form)) 'quote) + (consp (cdr (nth 2 form))) + (symbolp (nth 1 (nth 2 form)))))) (byte-compile-defalias-warn (nth 1 (nth 1 form))) (setq byte-compile-function-environment (cons (cons (nth 1 (nth 1 form)) - (nth 1 (nth 2 form))) + (if constant (nth 1 (nth 2 form)) t)) byte-compile-function-environment)))) (byte-compile-normal-call form)) @@ -3928,7 +3934,7 @@ invoked interactively." (while rest (or (nth 1 (car rest)) (null (setq f (car (car rest)))) - (byte-compile-fdefinition f t) + (functionp (byte-compile-fdefinition f t)) (commandp (byte-compile-fdefinition f nil)) (setq uncalled (cons f uncalled))) (setq rest (cdr rest))) -- cgit v1.3 From 366fc3f9ed963d7c394f8b6dd5ae13bd649c8474 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Tue, 9 Nov 2004 11:05:40 +0000 Subject: * Makefile.in (maintainer-clean): Depend on distclean. --- lisp/ChangeLog | 2 ++ lisp/Makefile.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 116eea6e848..97449ad3c7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -10,6 +10,8 @@ 2004-11-09 Jan Dj,Ad(Brv + * Makefile.in (maintainer-clean): Depend on distclean. + * help-fns.el (help-C-file-name): File name must be in build-files to be returned. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index d6d3eb3c278..e87ffa6f265 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -311,7 +311,7 @@ bootstrap-prepare: fi \ fi -maintainer-clean: +maintainer-clean: distclean cd $(lisp); rm -f *.elc */*.elc $(AUTOGENEL) bootstrap-clean: -- cgit v1.3 From 0c90b629443728a9f6b054f351a7ac21c958ed69 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 9 Nov 2004 14:37:10 +0000 Subject: (easy-menu-intern): Revert to no-downcasing. (easy-menu-name-match): Revert correspondingly. --- lisp/ChangeLog | 71 ++++++++++++++++++++++++++------------------- lisp/emacs-lisp/easymenu.el | 23 ++------------- 2 files changed, 43 insertions(+), 51 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 97449ad3c7f..14333dfe9d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-09 Stefan + + * emacs-lisp/easymenu.el (easy-menu-intern): Revert to no-downcasing. + (easy-menu-name-match): Revert correspondingly. + 2004-11-09 Richard M. Stallman * emacs-lisp/bytecomp.el (byte-compile-defalias): @@ -18,16 +23,16 @@ 2004-11-09 Jay Belanger * calc/calc.el (calc-mode-hook, calc-trail-mode-hook) - (calc-start-hook, calc-end-hook, calc-load-hook): New variables. + (calc-start-hook, calc-end-hook, calc-load-hook): New variables. - * calc/calc.el (calc, calc-trail-display, calc-mode): Removed - obsolete sections. + * calc/calc.el (calc, calc-trail-display, calc-mode): + Remove obsolete sections. - * calc/calc.el (calc-x-paste-text): Removed. + * calc/calc.el (calc-x-paste-text): Remove. + + * calc/calc-ext.el (calc-init-extensions): Bind calc-yank to + mouse-2. - * calc/calc-ext.el (calc-init-extensions): Bound calc-yank to - mouse-2. - 2004-11-09 Nick Roberts * progmodes/gdb-ui.el (gdb-current-stack-level): New variable. @@ -35,6 +40,15 @@ current frame (in case of recursive calls). (gdb-show-changed-values): Add :version keyword. +2004-11-08 Stefan Monnier + + * international/mule.el: Fix some warnings. + + * international/mule-cmds.el: Change coding-system to utf-8. + (select-safe-coding-system-interactively): + New function extracted from select-safe-coding-system. + (select-safe-coding-system): Use it. + 2004-11-08 Richard M. Stallman * subr.el (syntax-after): Doc fix. @@ -60,16 +74,16 @@ 2004-11-08 Jay Belanger * calc/calcalg2.el (math-do-integral-methods): Try linear then - non-linear substitutions. + non-linear substitutions. 2004-11-08 Jay Belanger * calc/calcalg2.el (math-linear-subst-tried): New variable. - (math-do-integral): Set `math-linear-subst-tried' to nil. + (math-do-integral): Set `math-linear-subst-tried' to nil. (math-do-integral-methods): Use `math-linear-subst-tried' to - determine what type of substitution to try. - (math-integ-try-linear-substituion): Set - `math-linear-subst-tried' to t. + determine what type of substitution to try. + (math-integ-try-linear-substituion): + Set `math-linear-subst-tried' to t. 2004-11-08 Kim F. Storm @@ -91,7 +105,7 @@ * simple.el (next-error group, face): Move before first use. (next-error-highlight, next-error-highlight-no-select): Likewise. - * simple.el (line-move-invisible-p): Renamed from line-move-invisible. + * simple.el (line-move-invisible-p): Rename from line-move-invisible. (line-move): New args NOERROR and TO-END. Return t if if succeed in moving specified number of lines. (move-end-of-line): New function. @@ -105,21 +119,21 @@ * emacs-lisp/elp.el (elp-results): Delete wasteful beginning-of-buffer. - * international/iso-cvt.el (iso-cvt-define-menu): - menu-bar-files-menu renamed to menu-bar-file-menu. + * international/iso-cvt.el (iso-cvt-define-menu): + Rename menu-bar-files-menu to menu-bar-file-menu. * net/browse-url.el (browse-url-gnome-moz-program) (browse-url-gnome-moz-arguments): Move up before first use. * net/tramp.el (tramp group): Add :version. - * progmodes/ada-xref.el (ada-gdb-application): + * progmodes/ada-xref.el (ada-gdb-application): Use goto-char instead of beginning-of-buffer. - * progmodes/cperl-mode.el (cperl-info-on-command): + * progmodes/cperl-mode.el (cperl-info-on-command): Use goto-char instead of beginning-of-buffer. - * progmodes/idlw-shell.el (idlwave-shell-examine-map): + * progmodes/idlw-shell.el (idlwave-shell-examine-map): Move up before first use. (idlwave-shell-temp-pro-file): Likewise. (idlwave-shell-temp-rinfo-save-file): Likewise. @@ -130,9 +144,8 @@ 2004-11-06 Kai Grossjohann - * net/tramp.el (tramp-coding-commands): Additionally try "uudecode - -o /dev/stdout" before trying "uudecode -o -". Suggested by Han - Boetes. + * net/tramp.el (tramp-coding-commands): Additionally try "uudecode -o + /dev/stdout" before trying "uudecode -o -". Suggested by Han Boetes. (tramp-uudecode): Mention `uudecode -o /dev/stdout'. 2004-11-06 David Ponce @@ -150,7 +163,7 @@ * emacs-lisp/easymenu.el (easy-menu-get-map): Fix last change. -2004-11-06 Stefan Monnier +2004-11-06 Stefan * emacs-lisp/easymenu.el (easy-menu-get-map-look-for-name): Remove. (easy-menu-lookup-name): New fun to replace it. @@ -189,8 +202,7 @@ 2004-11-04 Daniel Pfeiffer - * files.el (set-auto-mode): Don't get error after setting - -*-mode-*-. + * files.el (set-auto-mode): Don't get error after setting -*-mode-*-. 2004-11-04 Jan Dj,Ad(Brv @@ -312,8 +324,7 @@ (icalendar-convert-diary-to-ical) (icalendar-extract-ical-from-buffer): Use only two args for make-obsolete (XEmacs compatibility). - (icalendar-export-file, icalendar-import-file): Blank at end of - prompt. + (icalendar-export-file, icalendar-import-file): Blank at end of prompt. (icalendar-export-region): Doc fix. If error, return non-nil and write errors to a buffer. Use correct weekday for weekly recurring events. @@ -353,16 +364,16 @@ 2004-11-02 Pavel Kobiakov - * progmodes/flymake.el (flymake-err-line-patterns): Use - `flymake-reformat-err-line-patterns-from-compile-el' to convert + * progmodes/flymake.el (flymake-err-line-patterns): + Use `flymake-reformat-err-line-patterns-from-compile-el' to convert `compilation-error-regexp-alist-alist' to internal Flymake format. * progmodes/flymake.el: eliminated byte-compiler warnings. 2004-11-01 Jay Belanger - * calc/calc-frac.el (calc-over-notation): Replaced - `completing-read' with `interactive "s"'. + * calc/calc-frac.el (calc-over-notation): Replace `completing-read' + with `interactive "s"'. 2004-11-01 Jan Dj,Ad(Brv diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 7b18756fd7e..f42f326ba0a 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -42,25 +42,7 @@ menus, turn this variable off, otherwise it is probably better to keep it on." :version "20.3") (defsubst easy-menu-intern (s) - (if (stringp s) - (let ((copy (copy-sequence s)) - (pos 0) - found) - ;; For each letter that starts a word, flip its case. - ;; This way, the usual convention for menu strings (capitalized) - ;; corresponds to the usual convention for menu item event types - ;; (all lower case). It's a 1-1 mapping so causes no conflicts. - (while (setq found (string-match "\\<\\sw" copy pos)) - (setq pos (match-end 0)) - (unless (= (upcase (aref copy found)) - (downcase (aref copy found))) - (aset copy found - (if (= (upcase (aref copy found)) - (aref copy found)) - (downcase (aref copy found)) - (upcase (aref copy found)))))) - (intern copy)) - s)) + (if (stringp s) (intern s) s)) ;;;###autoload (put 'easy-menu-define 'lisp-indent-function 'defun) @@ -437,8 +419,7 @@ ITEM should be a keymap binding of the form (KEY . MENU-ITEM)." (error nil)) ;`item' might not be a proper list. ;; Also check the string version of the symbol name, ;; for backwards compatibility. - (eq (car-safe item) (intern name)) - (eq (car-safe item) (easy-menu-intern name))))))) + (eq (car-safe item) (intern name))))))) (defun easy-menu-always-true-p (x) "Return true if form X never evaluates to nil." -- cgit v1.3 From b4f8e43e24917fd0b9fd9d173d76a29363f70688 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 9 Nov 2004 14:50:30 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14333dfe9d0..e2efbbccbda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-11-09 Glenn Morris + + * calendar/diary-lib.el (diary-from-outlook) + (diary-from-outlook-gnus, diary-from-outlook-rmail): Do not use + interactive-p; but rather new optional argument DONOTASK. + 2004-11-09 Stefan * emacs-lisp/easymenu.el (easy-menu-intern): Revert to no-downcasing. -- cgit v1.3 From 32261ad34d6ac3844037212ee28325fb99fe06b0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 9 Nov 2004 16:59:44 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e2efbbccbda..c8382612ab1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,7 +2,7 @@ * calendar/diary-lib.el (diary-from-outlook) (diary-from-outlook-gnus, diary-from-outlook-rmail): Do not use - interactive-p; but rather new optional argument DONOTASK. + interactive-p; but rather new optional argument NOCONFIRM. 2004-11-09 Stefan -- cgit v1.3 From 6d37f0f14bac518a91dab3fb2b614eeabed3cbc8 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 9 Nov 2004 20:38:27 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c8382612ab1..8b7f5c6b709 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,42 @@ +2004-11-09 Jay Belanger + + * calc/calc-ext.el (calc-init-extensions): Remove old code. + + * calc/calc-ext.el (math-expr-data, math-mt-many, math-mt-func) + (calc-z-prefix-buf, calc-z-prefix-msgs): New variables. + (calc-z-prefix-help, calc-user-function-list): Use declared + variables calc-z-prefix-buf, calc-z-prefix-msgs. + (math-map-tree, math-map-tree-rec): Use declared variables + math-mt-many, math-mt-func. + (math-read-expression, math-read-string): Use declared variable + math-expr-data. + + * calc/calc-ext.el (math-normalize-nonstandard): Use declared + variable math-normalize-a. + + * calc/calc.el (math-normalize-a): New variable. + (math-normalize): Use declared variable math-normalize-a. + + * calc/calc-poly.el (math-expand-form): Use declared variable + math-mt-many. + + * calc/calc-rewr.el (math-rewrite, math-rewrite-phase): Use + declared variable math-mt-many. + (math-rewrite): Use declared variable math-mt-func. + + * calc/calc-vec.el (math-read-brackets, math-read-vector) + (math-read-matrix): Use declared variable math-expr-data. + + * calc/calc-lang.el (math-parse-fortran-vector) + (math-parse-fortran-vector-end, math-parse-tex-sum) + (math-parse-eqn-matrix, math-parse-eqn-prime) + (math-read-math-subscr): Use declared variable math-expr-data. + + * calc/calc-aent.el (math-read-exprs, math-read-expr-list) + (math-read-expr-level, math-read-token, calc-check-user-syntax) + (calc-match-user-syntax, math-read-if, math-factor-after) + (math-read-factor): Use declared variable math-expr-data. + 2004-11-09 Glenn Morris * calendar/diary-lib.el (diary-from-outlook) -- cgit v1.3 From dd0f1553b7d8db1ac00025e49a85ea6aa83ca9da Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Wed, 10 Nov 2004 00:43:48 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 28 ++- lisp/textmodes/conf-mode.el | 530 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 547 insertions(+), 11 deletions(-) create mode 100644 lisp/textmodes/conf-mode.el (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8b7f5c6b709..31a6ac57fda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,41 +1,47 @@ +2004-11-10 Daniel Pfeiffer + + * textmodes/conf-mode.el: New file. + + * files.el (auto-mode-alist, magic-mode-alist): Use it. + 2004-11-09 Jay Belanger * calc/calc-ext.el (calc-init-extensions): Remove old code. * calc/calc-ext.el (math-expr-data, math-mt-many, math-mt-func) - (calc-z-prefix-buf, calc-z-prefix-msgs): New variables. + (calc-z-prefix-buf, calc-z-prefix-msgs): New variables. (calc-z-prefix-help, calc-user-function-list): Use declared - variables calc-z-prefix-buf, calc-z-prefix-msgs. + variables calc-z-prefix-buf, calc-z-prefix-msgs. (math-map-tree, math-map-tree-rec): Use declared variables - math-mt-many, math-mt-func. + math-mt-many, math-mt-func. (math-read-expression, math-read-string): Use declared variable - math-expr-data. - + math-expr-data. + * calc/calc-ext.el (math-normalize-nonstandard): Use declared - variable math-normalize-a. + variable math-normalize-a. * calc/calc.el (math-normalize-a): New variable. (math-normalize): Use declared variable math-normalize-a. * calc/calc-poly.el (math-expand-form): Use declared variable - math-mt-many. + math-mt-many. * calc/calc-rewr.el (math-rewrite, math-rewrite-phase): Use - declared variable math-mt-many. + declared variable math-mt-many. (math-rewrite): Use declared variable math-mt-func. * calc/calc-vec.el (math-read-brackets, math-read-vector) - (math-read-matrix): Use declared variable math-expr-data. + (math-read-matrix): Use declared variable math-expr-data. * calc/calc-lang.el (math-parse-fortran-vector) (math-parse-fortran-vector-end, math-parse-tex-sum) (math-parse-eqn-matrix, math-parse-eqn-prime) - (math-read-math-subscr): Use declared variable math-expr-data. + (math-read-math-subscr): Use declared variable math-expr-data. * calc/calc-aent.el (math-read-exprs, math-read-expr-list) (math-read-expr-level, math-read-token, calc-check-user-syntax) (calc-match-user-syntax, math-read-if, math-factor-after) - (math-read-factor): Use declared variable math-expr-data. + (math-read-factor): Use declared variable math-expr-data. 2004-11-09 Glenn Morris diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el new file mode 100644 index 00000000000..327e8c8bc7e --- /dev/null +++ b/lisp/textmodes/conf-mode.el @@ -0,0 +1,530 @@ +;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files + +;; Copyright (C) 2004 by Daniel Pfeiffer +;; Keywords: conf ini windows java + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: +;; +;; This mode is designed to edit many similar varieties of Conf/Ini files and +;; Java properties. It started out from Aurélien Tisné's ini-mode. +;; `conf-space-keywords' were inspired by Robert Fitzgerald's any-ini-mode. + + +;;; Code: + +(require 'newcomment) + +;; Variables: + +(defgroup conf nil + "Configuration files." + :group 'data + :version "20.4") + +(defcustom conf-assignment-column 24 + "Align assignments to this column by default with \\[conf-align-assignments]. +If this number is negative, the `=' comes before the whitespace. Use 0 to +not align (only setting space according to `conf-assignment-space')." + :type 'integer + :group 'conf) + +(defcustom conf-javaprop-assignment-column 32 + "Value for `conf-assignment-column' in Java properties buffers." + :type 'integer + :group 'conf) + +(defcustom conf-colon-assignment-column (- (abs conf-assignment-column)) + "Value for `conf-assignment-column' in Java properties buffers." + :type 'integer + :group 'conf) + +(defcustom conf-assignment-space t + "Put at least one space around assignments when aligning." + :type 'boolean + :group 'conf) + +(defcustom conf-colon-assignment-space nil + "Value for `conf-assignment-space' in colon style Conf mode buffers." + :type 'boolean + :group 'conf) + + +(defvar conf-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-u" 'conf-unix-mode) + (define-key map "\C-c\C-w" 'conf-windows-mode) + (define-key map "\C-c\C-j" 'conf-javaprop-mode) + (define-key map "\C-c\C-s" 'conf-space-mode) + (define-key map "\C-c " 'conf-space-mode) + (define-key map "\C-c\C-c" 'conf-colon-mode) + (define-key map "\C-c:" 'conf-colon-mode) + (define-key map "\C-c\C-x" 'conf-xdefaults-mode) + (define-key map "\C-c\C-q" 'conf-quote-normal) + (define-key map "\C-c\"" 'conf-quote-normal) + (define-key map "\C-c'" 'conf-quote-normal) + (define-key map "\C-c\C-a" 'conf-align-assignments) + map) + "Local keymap for conf-mode buffers.") + +(defvar conf-mode-syntax-table + (let ((table (make-syntax-table))) + (modify-syntax-entry ?= "." table) + (modify-syntax-entry ?_ "_" table) + (modify-syntax-entry ?- "_" table) + (modify-syntax-entry ?. "_" table) + (modify-syntax-entry ?\' "\"" table) +; (modify-syntax-entry ?: "_" table) + (modify-syntax-entry ?\; "<" table) + (modify-syntax-entry ?\n ">" table) + (modify-syntax-entry ?\r ">" table) + table) + "Syntax table in use in Windows style conf-mode buffers.") + +(defvar conf-unix-mode-syntax-table + (let ((table (make-syntax-table conf-mode-syntax-table))) + (modify-syntax-entry ?\# "<" table) + ;; override + (modify-syntax-entry ?\; "." table) + table) + "Syntax table in use in Unix style conf-mode buffers.") + +(defvar conf-javaprop-mode-syntax-table + (let ((table (make-syntax-table conf-unix-mode-syntax-table))) + (modify-syntax-entry ?/ ". 124" table) + (modify-syntax-entry ?* ". 23b" table) + table) + "Syntax table in use in Java prperties buffers.") + +(defvar conf-xdefaults-mode-syntax-table + (let ((table (make-syntax-table conf-mode-syntax-table))) + (modify-syntax-entry ?! "<" table) + ;; override + (modify-syntax-entry ?\; "." table) + table) + "Syntax table in use in Xdefaults style conf-mode buffers.") + + +(defvar conf-font-lock-keywords + `(;; [section] (do this first because it may look like a parameter) + ("^[ \t]*\\[\\(.+\\)\\]" 1 'font-lock-type-face) + ;; var=val or var[index]=val + ("^[ \t]*\\(.+?\\)\\(?:\\[\\(.*?\\)\\]\\)?[ \t]*=" + (1 'font-lock-variable-name-face) + (2 'font-lock-constant-face nil t)) + ;; section { ... } (do this last because some assign ...{...) + ("^[ \t]*\\([^=:\n]+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend)) + "Keywords to hilight in Conf mode") + +(defvar conf-javaprop-font-lock-keywords + '(;; var=val + ("^[ \t]*\\(.+?\\)\\(?:\\.\\([0-9]+\\)\\(?:\\.\\(.+?\\)\\(?:\\.\\([0-9]+\\)\\(?:\\.\\(.+?\\)\\(?:\\.\\([0-9]+\\)\\(\\..+?\\)?\\)?\\)?\\)?\\)?\\)?\\([:= \t]\\|$\\)" + (1 'font-lock-variable-name-face) + (2 'font-lock-constant-face nil t) + (3 'font-lock-variable-name-face nil t) + (4 'font-lock-constant-face nil t) + (5 'font-lock-variable-name-face nil t) + (6 'font-lock-constant-face nil t) + (7 'font-lock-variable-name-face nil t))) + "Keywords to hilight in Conf Java Properties mode") + +(defvar conf-space-keywords-alist + '(("\\`/etc/gpm/" . "key\\|name\\|foreground\\|background\\|border\\|head") + ("\\`/etc/magic\\'" . "[^ \t]+[ \t]+\\(?:[bl]?e?\\(?:short\\|long\\)\\|byte\\|string\\)[^ \t]*") + ("/mod\\(?:ules\\|probe\\)\\.conf" . "alias\\|in\\(?:clude\\|stall\\)\\|options\\|remove") + ("/manpath\\.config" . "MAN\\(?:DATORY_MANPATH\\|PATH_MAP\\|DB_MAP\\)") + ("/sensors\\.conf" . "chip\\|bus\\|label\\|compute\\|set\\|ignore") + ("/sane\\(\\.d\\)?/" . "option\\|device\\|port\\|usb\\|sc\\(?:si\\|anner\\)") + ("/resmgr\\.conf" . "class\\|add\\|allow\\|deny") + ("/dictionary\\.lst\\'" . "DICT\\|HYPH\\|THES") + ("/tuxracer/options" . "set")) + "File name based settings for `conf-space-keywords'.") + +(defvar conf-space-keywords nil + "Regexps for functions that may come before a space assignment. +This allows constructs such as +keyword var value +This variable is best set in the file local variables, or through +`conf-space-keywords-alist'.") + +(defvar conf-space-font-lock-keywords + `(;; [section] (do this first because it may look like a parameter) + ("^[ \t]*\\[\\(.+\\)\\]" 1 'font-lock-type-face) + ;; section { ... } (do this first because it looks like a parameter) + ("^[ \t]*\\(.+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face) + ;; var val + (eval if conf-space-keywords + (list (concat "^[ \t]*\\(" conf-space-keywords "\\)[ \t]+\\([^\000- ]+\\)") + '(1 'font-lock-keyword-face) + '(2 'font-lock-variable-name-face)) + '("^[ \t]*\\([^\000- ]+\\)" 1 'font-lock-variable-name-face))) + "Keywords to hilight in Conf Space mode") + +(defvar conf-colon-font-lock-keywords + `(;; [section] (do this first because it may look like a parameter) + ("^[ \t]*\\[\\(.+\\)\\]" 1 'font-lock-type-face) + ;; var: val + ("^[ \t]*\\(.+?\\)[ \t]*:" + (1 'font-lock-variable-name-face)) + ;; section { ... } (do this last because some assign ...{...) + ("^[ \t]*\\([^:\n]+\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend)) + "Keywords to hilight in Conf Colon mode") + +(defvar conf-assignment-sign ?= + "What sign is used for assignments.") + +(defvar conf-assignment-regexp ".+?\\([ \t]*=[ \t]*\\)" + "Regexp to recognize assignments. +It is anchored after the first sexp on a line. There must a +grouping for the assignment sign, including leading and trailing +whitespace.") + + +;; If anybody can figure out how to get the same effect by configuring +;; `align', I'd be glad to hear. +(defun conf-align-assignments (&optional arg) + (interactive "P") + (setq arg (if arg + (prefix-numeric-value arg) + conf-assignment-column)) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (let ((cs (comment-beginning))) ; go before comment if within + (if cs (goto-char cs))) + (while (forward-comment 9)) ; max-int? + (when (and (not (eobp)) + (looking-at conf-assignment-regexp)) + (goto-char (match-beginning 1)) + (delete-region (point) (match-end 1)) + (if conf-assignment-sign + (if (>= arg 0) + (progn + (indent-to-column arg) + (or (not conf-assignment-space) (memq (char-before (point)) '(? ?\t)) (insert ? )) + (insert conf-assignment-sign (if (and conf-assignment-space (not (eolp))) ?\ ""))) + (insert (if conf-assignment-space ?\ "") conf-assignment-sign) + (unless (eolp) + (indent-to-column (- arg)) + (or (not conf-assignment-space) (memq (char-before (point)) '(? ?\t)) (insert ? )))) + (unless (eolp) + (if (>= (current-column) (abs arg)) + (insert ? ) + (indent-to-column (abs arg)))))) + (forward-line)))) + + +(defun conf-quote-normal () + "Set the syntax of \" and ' to punctuation. +This only affects the current buffer. Some conf files use quotes +to delimit strings, while others allow quotes as simple parts of +the assigned value. In those files font locking will be wrong, +and you can correct it with this command. (Some files even do +both, i.e. quotes delimit strings, except when they are +unbalanced, but hey...)" + (interactive) + (let ((table (copy-syntax-table (syntax-table)))) + (modify-syntax-entry ?\" "." table) + (modify-syntax-entry ?\' "." table) + (set-syntax-table table) + (and (boundp 'font-lock-mode) + font-lock-mode + (font-lock-fontify-buffer)))) + + +(defun conf-outline-level () + (let ((depth 0) + (pt (match-end 0))) + (condition-case nil + (while (setq pt (scan-lists pt -1 1) + depth (1+ depth))) + (scan-error depth)))) + + + +;;;###autoload +(defun conf-mode (&optional comment syntax-table name) + "Mode for Unix and Windows Conf files and Java properties. +Most conf files know only three kinds of constructs: parameter +assignments optionally grouped into sections and comments. Yet +there is a great range of variation in the exact syntax of conf +files. See below for various wrapper commands that set up the +details for some of the most widespread variants. + +This mode sets up font locking, outline, imenu and it provides +alignment support through `conf-align-assignments'. If strings +come out wrong, try `conf-quote-normal'. + +Some files allow continuation lines, either with a backslash at +the end of line, or by indenting the next line (further). These +constructs cannot currently be recognized. + +Because of this great variety of nuances, which are often not +even clearly specified, please don't expect it to get every file +quite right. Patches that clearly identify some special case, +without breaking the general ones, are welcome. + +If instead you start this mode with the generic `conf-mode' +command, it will parse the buffer. It will generally well +identify the first four cases listed below. If the buffer +doesn't have enough contents to decide, this is identical to +`conf-windows-mode' on Windows, elsewhere to `conf-unix-mode'. See +also `conf-space-mode', `conf-colon-mode', `conf-javaprop-mode' and +`conf-xdefaults-mode'. + +\\{conf-mode-map}" + + (interactive) + (if (not comment) + (let ((unix 0) (win 0) (equal 0) (colon 0) (space 0) (jp 0)) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (skip-chars-forward " \t\f") + (cond ((eq (char-after) ?\#) (setq unix (1+ unix))) + ((eq (char-after) ?\;) (setq win (1+ win))) + ((eq (char-after) ?\[)) ; nop + ((eolp)) ; nop + ((eq (char-after) ?})) ; nop + ;; recognize at most double spaces within names + ((looking-at "[^ \t\n=:]+\\(?: ?[^ \t\n=:]+\\)*[ \t]*[=:]") + (if (eq (char-before (match-end 0)) ?=) + (setq equal (1+ equal)) + (setq colon (1+ colon)))) + ((looking-at "/[/*]") (setq jp (1+ jp))) + ((looking-at ".*{")) ; nop + ((setq space (1+ space)))) + (forward-line))) + (if (> jp (max unix win 3)) + (conf-javaprop-mode) + (if (> colon (max equal space)) + (conf-colon-mode) + (if (> space (max equal colon)) + (conf-space-mode) + (if (or (> win unix) + (and (= win unix) (eq system-type 'windows-nt))) + (conf-windows-mode) + (conf-unix-mode)))))) + (kill-all-local-variables) + (use-local-map conf-mode-map) + + (setq major-mode 'conf-mode + mode-name name) + (set (make-local-variable 'comment-start) comment) + (set (make-local-variable 'comment-start-skip) + (concat comment-start "+\\s *")) + (set (make-local-variable 'comment-use-syntax) t) + (set (make-local-variable 'parse-sexp-ignore-comments) t) + (set (make-local-variable 'outline-regexp) + "[ \t]*\\(?:\\[\\|.+[ \t\n]*{\\)") + (set (make-local-variable 'outline-heading-end-regexp) + "[\n}]") + (set (make-local-variable 'outline-level) + 'conf-outline-level) + (set-syntax-table syntax-table) + (setq imenu-generic-expression + '(("Parameters" "^[ \t]*\\(.+?\\)[ \t]*=" 1) + ;; [section] + (nil "^[ \t]*\\[[ \t]*\\(.+\\)[ \t]*\\]" 1) + ;; section { ... } + (nil "^[ \t]*\\([^=:\n]+\\)[ \t\n]*{" 1))) + + (run-mode-hooks 'conf-mode-hook))) + +;;;###autoload +(defun conf-unix-mode () + "Conf Mode starter for Unix style Conf files. +Comments start with `#'. +For details see `conf-mode'. Example: + +# Conf mode font-locks this right on Unix and with C-c C-u + +\[Desktop Entry] + Encoding=UTF-8 + Name=The GIMP + Name[ca]=El GIMP + Name[cs]=GIMP" + (interactive) + (conf-mode "#" conf-unix-mode-syntax-table "Conf[Unix]")) + +;;;###autoload +(defun conf-windows-mode () + "Conf Mode starter for Windows style Conf files. +Comments start with `;'. +For details see `conf-mode'. Example: + +; Conf mode font-locks this right on Windows and with C-c C-w + +\[ExtShellFolderViews] +Default={5984FFE0-28D4-11CF-AE66-08002B2E1262} +{5984FFE0-28D4-11CF-AE66-08002B2E1262}={5984FFE0-28D4-11CF-AE66-08002B2E1262} + +\[{5984FFE0-28D4-11CF-AE66-08002B2E1262}] +PersistMoniker=file://Folder.htt" + (interactive) + (conf-mode ";" conf-mode-syntax-table "Conf[WinIni]")) + +;; Here are a few more or less widespread styles. There are others, so +;; obscure, they are not covered. E.g. RFC 2614 allows both Unix and Windows +;; comments. Or the donkey has (* Pascal comments *) -- roll your own starter +;; if you need it. + +;;;###autoload +(defun conf-javaprop-mode () + "Conf Mode starter for Java properties files. +Comments start with `#' but are also recognized with `//' or +between `/*' and `*/'. +For details see `conf-mode'. Example: + +# Conf mode font-locks this right with C-c C-j (Java properties) +// another kind of comment +/* yet another */ + +name:value +name=value +name value +x.1 = +x.2.y.1.z.1 = +x.2.y.1.z.2.zz =" + (interactive) + (conf-mode "#" conf-javaprop-mode-syntax-table "Conf[JavaProp]") + (set (make-local-variable 'conf-assignment-column) + conf-javaprop-assignment-column) + (set (make-local-variable 'conf-assignment-regexp) + ".+?\\([ \t]*[=: \t][ \t]*\\|$\\)") + (set (make-local-variable 'conf-font-lock-keywords) + conf-javaprop-font-lock-keywords) + (setq comment-start-skip "\\(?:#+\\|/[/*]+\\)\\s *") + (setq imenu-generic-expression + '(("Parameters" "^[ \t]*\\(.+?\\)[=: \t]" 1)))) + +;;;###autoload +(defun conf-space-mode (&optional keywords) + "Conf Mode starter for space separated conf files. +\"Assignments\" are with ` '. Keywords before the parameters are +recognized according to `conf-space-keywords'. Interactively +with a prefix ARG of `0' no keywords will be recognized. With +any other prefix arg you will be prompted for a regexp to match +the keywords. Programmatically you can pass such a regexp as +KEYWORDS, or any non-nil non-string for no keywords. + +For details see `conf-mode'. Example: + +# Conf mode font-locks this right with C-c C-s (space separated) + +image/jpeg jpeg jpg jpe +image/png png +image/tiff tiff tif + +# Or with keywords (from a recognized file name): +class desktop +# Standard multimedia devices +add /dev/audio desktop +add /dev/mixer desktop" + (interactive + (list (if current-prefix-arg + (if (> (prefix-numeric-value current-prefix-arg) 0) + (read-string "Regexp to match keywords: ") + t)))) + (conf-unix-mode) + (setq mode-name "Conf[Space]") + (set (make-local-variable 'conf-assignment-sign) + nil) + (set (make-local-variable 'conf-font-lock-keywords) + conf-space-font-lock-keywords) + ;; This doesn't seem right, but the next two depend on conf-space-keywords + ;; being set, while after-change-major-mode-hook might set up imenu, needing + ;; the following result: + (hack-local-variables-prop-line) + (hack-local-variables) + (if keywords + (set (make-local-variable 'conf-space-keywords) + (if (stringp keywords) keywords)) + (or conf-space-keywords + (not buffer-file-name) + (set (make-local-variable 'conf-space-keywords) + (assoc-default buffer-file-name conf-space-keywords-alist + 'string-match)))) + (set (make-local-variable 'conf-assignment-regexp) + (if conf-space-keywords + (concat "\\(?:" conf-space-keywords "\\)[ \t]+.+?\\([ \t]+\\|$\\)") + ".+?\\([ \t]+\\|$\\)")) + (setq imenu-generic-expression + `(,@(cdr imenu-generic-expression) + ("Parameters" + ,(if conf-space-keywords + (concat "^[ \t]*\\(?:" conf-space-keywords + "\\)[ \t]+\\([^ \t\n]+\\)\\(?:[ \t]\\|$\\)") + "^[ \t]*\\([^ \t\n[]+\\)\\(?:[ \t]\\|$\\)") + 1)))) + +;;;###autoload +(defun conf-colon-mode (&optional comment syntax-table name) + "Conf Mode starter for Colon files. +\"Assignments\" are with `:'. +For details see `conf-mode'. Example: + +# Conf mode font-locks this right with C-c C-c (colon) + + : \"\\241\" exclamdown + : \"\\242\" cent" + (interactive) + (if comment + (conf-mode comment syntax-table name) + (conf-unix-mode) + (setq mode-name "Conf[Colon]")) + (set (make-local-variable 'conf-assignment-space) + conf-colon-assignment-space) + (set (make-local-variable 'conf-assignment-column) + conf-colon-assignment-column) + (set (make-local-variable 'conf-assignment-sign) + ?:) + (set (make-local-variable 'conf-assignment-regexp) + ".+?\\([ \t]*:[ \t]*\\)") + (set (make-local-variable 'conf-font-lock-keywords) + conf-colon-font-lock-keywords) + (setq imenu-generic-expression + `(("Parameters" "^[ \t]*\\(.+?\\)[ \t]*:" 1) + ,@(cdr imenu-generic-expression)))) + +;;;###autoload +(defun conf-xdefaults-mode () + "Conf Mode starter for Xdefaults files. +Comments start with `!' and \"assignments\" are with `:'. +For details see `conf-mode'. Example: + +! Conf mode font-locks this right with C-c C-x (.Xdefaults) + +*background: gray99 +*foreground: black" + (interactive) + (conf-colon-mode "!" conf-xdefaults-mode-syntax-table "Conf[Xdefaults]")) + + +;; font lock support +(if (boundp 'font-lock-defaults-alist) + (add-to-list + 'font-lock-defaults-alist + (cons 'conf-mode + (list 'conf-font-lock-keywords nil t nil nil)))) + + +(provide 'conf-mode) + +;;; conf-mode.el ends here -- cgit v1.3 From df388ce6a4a0ab063dca560ec7edb43fb5ea8db7 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 10 Nov 2004 06:46:50 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31a6ac57fda..497a6b3efba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-11-10 Nick Roberts + + * tooltip.el: Don't require cl, comint, gud, gdb-ui for + compilation. The resulting compiler warnings appear to be + harmless. + 2004-11-10 Daniel Pfeiffer * textmodes/conf-mode.el: New file. -- cgit v1.3 From 86523fac0bb1cb56517780dd6289a92fa608c65d Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 10 Nov 2004 10:51:01 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 497a6b3efba..00f7d381254 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-10 Thien-Thi Nguyen + + * ebuff-menu.el: Doc fixes throughout. + (electric-buffer-menu-mode-hook): New defvar. + 2004-11-10 Nick Roberts * tooltip.el: Don't require cl, comint, gud, gdb-ui for -- cgit v1.3 From e9146d5accb44e7c00a350a95492b3db6f1ee980 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 10 Nov 2004 14:39:40 +0000 Subject: (sgml-tag-text-p): New fun. (sgml-parse-tag-backward): Use it to skip spurious < or >. --- lisp/ChangeLog | 15 ++++-- lisp/textmodes/sgml-mode.el | 117 +++++++++++++++++++++++++++----------------- 2 files changed, 83 insertions(+), 49 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00f7d381254..c6587f7d5ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-10 Stefan Monnier + + * textmodes/sgml-mode.el (sgml-tag-text-p): New fun. + (sgml-parse-tag-backward): Use it to skip spurious < or >. + 2004-11-10 Thien-Thi Nguyen * ebuff-menu.el: Doc fixes throughout. @@ -15,6 +20,10 @@ * files.el (auto-mode-alist, magic-mode-alist): Use it. +2004-11-09 Stefan Monnier + + * international/iso-cvt.el (iso-cvt-define-menu): Clean up namespace. + 2004-11-09 Jay Belanger * calc/calc-ext.el (calc-init-extensions): Remove old code. @@ -37,8 +46,8 @@ * calc/calc-poly.el (math-expand-form): Use declared variable math-mt-many. - * calc/calc-rewr.el (math-rewrite, math-rewrite-phase): Use - declared variable math-mt-many. + * calc/calc-rewr.el (math-rewrite, math-rewrite-phase): + Use declared variable math-mt-many. (math-rewrite): Use declared variable math-mt-func. * calc/calc-vec.el (math-read-brackets, math-read-vector) @@ -104,8 +113,6 @@ 2004-11-08 Stefan Monnier - * international/mule.el: Fix some warnings. - * international/mule-cmds.el: Change coding-system to utf-8. (select-safe-coding-system-interactively): New function extracted from select-safe-coding-system. diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 4ac96b2e4b0..dd606a53434 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1,6 +1,7 @@ ;;; sgml-mode.el --- SGML- and HTML-editing modes -;; Copyright (C) 1992,95,96,98,2001,2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. ;; Author: James Clark ;; Maintainer: FSF @@ -1053,53 +1054,79 @@ You might want to turn on `auto-fill-mode' to get better results." (and (>= start (point-min)) (equal str (buffer-substring-no-properties start (point)))))) +(defun sgml-tag-text-p (start end) + "Return non-nil if text between START and END is a tag. +Checks among other things that the tag does not contain spurious +unquoted < or > chars inside, which would indicate that it +really isn't a tag after all." + (save-excursion + (with-syntax-table sgml-tag-syntax-table + (let ((pps (parse-partial-sexp start end 2))) + (and (= (nth 0 pps) 0)))))) + (defun sgml-parse-tag-backward (&optional limit) "Parse an SGML tag backward, and return information about the tag. Assume that parsing starts from within a textual context. Leave point at the beginning of the tag." - (let (tag-type tag-start tag-end name) - (or (re-search-backward "[<>]" limit 'move) - (error "No tag found")) - (when (eq (char-after) ?<) - ;; Oops!! Looks like we were not in a textual context after all!. - ;; Let's try to recover. - (with-syntax-table sgml-tag-syntax-table - (forward-sexp) - (forward-char -1))) - (setq tag-end (1+ (point))) - (cond - ((sgml-looking-back-at "--") ; comment - (setq tag-type 'comment - tag-start (search-backward "\\s *<\\)*\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\)?\\s *\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*[Hh][Tt][Mm][Ll]" . html-mode) + (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") + (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)"))) + (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<" + comment-re "*" + "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?" + "[Hh][Tt][Mm][Ll]")) . html-mode) ;; These two must come after html, because they are more general: ("<\\?xml " . xml-mode) ("\\s *<\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*!DOCTYPE " . sgml-mode) -- cgit v1.3 From 4726a1dff03f8fd2bbd5e2f0c64932e30191c00b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 11 Nov 2004 06:14:18 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d0d67102da..e873f621d2c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,47 @@ +2004-11-10 Jay Belanger + * calc/calc-aent.el (calc-do-quick-calc): Use kill-new to append + string to kill-ring. + + * calc/calc-aent.el (calc-alg-exp, math-toks) + (math-exp-pos,math-exp-old-pos, math-exp-token) + (math-exp-keep-spaces, math-exp-str): New variables. + (calc-do-alg-entry, calcAlg-equals, calcAlg-edit) + (calcAlg-enter): Use declared variable calc-alg-exp. + (math-build-parse-table, math-find-user-token): Use declared + variable math-toks. + (math-read-exprs, math-read-token, calc-check-user-syntax) + (calc-match-user-syntax, match-factor-after, math-read-factor): + Use declared variables math-exp-pos math-exp-old-pos. + (math-read-exprs, math-read-token, math-read-expr-level) + (calc-check-user-syntax, calc-match-user-syntax) + (match-factor-after, math-read-factor): Use declared variable + math-exp-token. + (math-read-exprs, math-read-expr-list, math-read-token) + (math-read-factor): Use declared variable math-exp-keep-spaces. + (math-read-exprs, math-read-token): Use declared variable + math-exp-str. + (calc-match-user-syntax): Made m a local variable. + + * calc/calc-ext.el (math-read-expr): Use declared variables + math-exp-pos, math-exp-old-pos, math-exp-str, math-exp-token, + math-exp-keep-spaces. + + * calc/calc-forms.el (math-read-angle-bracket): Use declared + variables math-exp-pos, math-exp-str. + + * calc/calc-lang.el (math-parse-tex-sum): Use declared variable + math-exp-old-pos. + (math-parse-fortran-vector, math-parse-fortran-vector-end) + (math-parse-eqn-prime): Use declared variable math-exp-token. + + * calc/calc-vec.el (math-read-brackets, math-check-for-commas): + Use declared variable math-exp-pos. + (math-check-for-commas): Use declared variable math-exp-str. + (math-read-brackets): Use declared variables math-exp-old-pos, + math-exp-keep-spaces. + (math-read-brackets, math-read-vector, math-read-matrix): Use + declared variable math-exp-token. + 2004-11-10 Stefan Monnier * files.el (magic-mode-alist): Reduce backtracking in the HTML regexp. -- cgit v1.3 From 3a502e66dc91e7dcca25e099cfa905a2ece24177 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Nov 2004 15:01:34 +0000 Subject: (pr-get-symbol): Don't downcase. --- lisp/ChangeLog | 25 +++++++++++++++---------- lisp/printing.el | 5 +---- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e873f621d2c..4a581107e08 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,14 +1,19 @@ +2004-11-11 Stefan Monnier + + * printing.el (pr-get-symbol): Don't downcase. + 2004-11-10 Jay Belanger + * calc/calc-aent.el (calc-do-quick-calc): Use kill-new to append - string to kill-ring. + string to kill-ring. * calc/calc-aent.el (calc-alg-exp, math-toks) (math-exp-pos,math-exp-old-pos, math-exp-token) - (math-exp-keep-spaces, math-exp-str): New variables. - (calc-do-alg-entry, calcAlg-equals, calcAlg-edit) + (math-exp-keep-spaces, math-exp-str): New variables. + (calc-do-alg-entry, calcAlg-equals, calcAlg-edit) (calcAlg-enter): Use declared variable calc-alg-exp. (math-build-parse-table, math-find-user-token): Use declared - variable math-toks. + variable math-toks. (math-read-exprs, math-read-token, calc-check-user-syntax) (calc-match-user-syntax, match-factor-after, math-read-factor): Use declared variables math-exp-pos math-exp-old-pos. @@ -17,17 +22,17 @@ (match-factor-after, math-read-factor): Use declared variable math-exp-token. (math-read-exprs, math-read-expr-list, math-read-token) - (math-read-factor): Use declared variable math-exp-keep-spaces. + (math-read-factor): Use declared variable math-exp-keep-spaces. (math-read-exprs, math-read-token): Use declared variable math-exp-str. (calc-match-user-syntax): Made m a local variable. * calc/calc-ext.el (math-read-expr): Use declared variables - math-exp-pos, math-exp-old-pos, math-exp-str, math-exp-token, + math-exp-pos, math-exp-old-pos, math-exp-str, math-exp-token, math-exp-keep-spaces. * calc/calc-forms.el (math-read-angle-bracket): Use declared - variables math-exp-pos, math-exp-str. + variables math-exp-pos, math-exp-str. * calc/calc-lang.el (math-parse-tex-sum): Use declared variable math-exp-old-pos. @@ -35,12 +40,12 @@ (math-parse-eqn-prime): Use declared variable math-exp-token. * calc/calc-vec.el (math-read-brackets, math-check-for-commas): - Use declared variable math-exp-pos. + Use declared variable math-exp-pos. (math-check-for-commas): Use declared variable math-exp-str. (math-read-brackets): Use declared variables math-exp-old-pos, math-exp-keep-spaces. - (math-read-brackets, math-read-vector, math-read-matrix): Use - declared variable math-exp-token. + (math-read-brackets, math-read-vector, math-read-matrix): + Use declared variable math-exp-token. 2004-11-10 Stefan Monnier diff --git a/lisp/printing.el b/lisp/printing.el index 3efb53111fd..f466f33c830 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -2474,9 +2474,6 @@ See `pr-ps-printer-alist'.") (eval-and-compile (defun pr-get-symbol (name) - ;; Recent versions of easy-menu downcase names before interning them. - (and (fboundp 'easy-menu-name-match) - (setq name (downcase name))) (or (intern-soft name) (make-symbol name))) @@ -6385,5 +6382,5 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (provide 'printing) -;;; arch-tag: 9ce9ac3f-0f60-4370-900b-1943215d9d18 +;; arch-tag: 9ce9ac3f-0f60-4370-900b-1943215d9d18 ;;; printing.el ends here -- cgit v1.3 From af61551b5edda43931b5cadc7e63114ccc2c75d0 Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Thu, 11 Nov 2004 19:02:56 +0000 Subject: (desktop-buffer-mode-handlers, desktop-after-read-hook, desktop-clear-preserve-buffers-regexp, desktop-file-name-format, desktop-globals-to-clear, desktop-no-desktop-file-hook, desktop-path, desktop-save): Add :version. --- lisp/ChangeLog | 7 +++++++ lisp/desktop.el | 24 ++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4a581107e08..47fa7ea6cda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-11-11 Lars Hansen + + * desktop.el (desktop-buffer-mode-handlers, desktop-after-read-hook, + desktop-clear-preserve-buffers-regexp, desktop-file-name-format, + desktop-globals-to-clear, desktop-no-desktop-file-hook, desktop-path, + desktop-save): Add :version. + 2004-11-11 Stefan Monnier * printing.el (pr-get-symbol): Don't downcase. diff --git a/lisp/desktop.el b/lisp/desktop.el index 64e8770ffd0..0a423aa7c42 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -129,7 +129,8 @@ determine where the desktop is saved." (const :tag "Ask if desktop file exists, else don't save" ask-if-exists) (const :tag "Save if desktop file exists, else don't" if-exists) (const :tag "Never save" nil)) - :group 'desktop) + :group 'desktop + :version "21.4") (defcustom desktop-base-file-name (convert-standard-filename ".emacs.desktop") @@ -142,7 +143,8 @@ determine where the desktop is saved." "List of directories to search for the desktop file. The base name of the file is specified in `desktop-base-file-name'." :type '(repeat directory) - :group 'desktop) + :group 'desktop + :version "21.4") (defcustom desktop-missing-file-warning nil "*If non-nil then `desktop-read' asks if a non-existent file should be recreated. @@ -151,19 +153,22 @@ Also pause for a moment to display message about errors signaled in If nil, just print error messages in the message buffer." :type 'boolean - :group 'desktop) + :group 'desktop + :version "21.4") (defcustom desktop-no-desktop-file-hook nil "Normal hook run when `desktop-read' can't find a desktop file. May e.g. be used to show a dired buffer." :type 'hook - :group 'desktop) + :group 'desktop + :version "21.4") (defcustom desktop-after-read-hook nil "Normal hook run after a successful `desktop-read'. May e.g. be used to show a buffer list." :type 'hook - :group 'desktop) + :group 'desktop + :version "21.4") (defcustom desktop-save-hook nil "Normal hook run before the desktop is saved in a desktop file. @@ -198,14 +203,16 @@ An element may be variable name (a symbol) or a cons cell of the form \(VAR . FORM). Symbols are set to nil and for cons cells VAR is set to the value obtained by evaluateing FORM." :type '(repeat (restricted-sexp :match-alternatives (symbolp consp))) - :group 'desktop) + :group 'desktop + :version "21.4") (defcustom desktop-clear-preserve-buffers-regexp "^\\(\\*scratch\\*\\|\\*Messages\\*\\|\\*tramp/.+\\*\\)$" "Regexp identifying buffers that `desktop-clear' should not delete. See also `desktop-clear-preserve-buffers'." :type 'regexp - :group 'desktop) + :group 'desktop + :version "21.4") (defcustom desktop-clear-preserve-buffers nil "*List of buffer names that `desktop-clear' should not delete. @@ -257,7 +264,8 @@ Possible values are: tilde -- Relative to ~. local -- Relative to directory of desktop file." :type '(choice (const absolute) (const tilde) (const local)) - :group 'desktop) + :group 'desktop + :version "21.4") ;;;###autoload (defvar desktop-save-buffer nil -- cgit v1.3 From fe1f8500f81321cfed5a396e773d3efa0920d811 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 11 Nov 2004 20:16:15 +0000 Subject: (math-defcache): Use defvar for the new variables it creates. --- lisp/ChangeLog | 5 +++++ lisp/calc/calc-ext.el | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 47fa7ea6cda..89361c1c11a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-11 Jay Belanger + + * calc/calc-ext.el (math-defcache): Use defvar for the new + variables it creates. + 2004-11-11 Lars Hansen * desktop.el (desktop-buffer-mode-handlers, desktop-after-read-hook, diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index ae6e6001c5e..77057fd4a7a 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1849,10 +1849,10 @@ calc-kill calc-kill-region calc-yank)))) (last-prec (intern (concat (symbol-name name) "-last-prec"))) (last-val (intern (concat (symbol-name name) "-last")))) (list 'progn - (list 'setq cache-prec (if init (math-numdigs (nth 1 init)) -100)) - (list 'setq cache-val (list 'quote init)) - (list 'setq last-prec -100) - (list 'setq last-val nil) + (list 'defvar cache-prec (if init (math-numdigs (nth 1 init)) -100)) + (list 'defvar cache-val (list 'quote init)) + (list 'defvar last-prec -100) + (list 'defvar last-val nil) (list 'setq 'math-cache-list (list 'cons (list 'quote cache-prec) -- cgit v1.3 From 13643b5f1787dc35035969dcb4d8c08649087f80 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 11 Nov 2004 21:05:47 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89361c1c11a..df4c5c51e7a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,26 @@ 2004-11-11 Jay Belanger + * calc/calc-comb.el (math-prime-factors-finished): Declared it as + a variable. + (calcFunc-dfac): Replaced unbound max by n. + (math-stirling-local-cache): New variable. + (math-stirling-number, math-stirling-1, math-stirling-2): + Replaced the variable `cache' by the declared variable + math-stirling-local-cache. + (var-RandSeed): Declared it as a variable. + (math-init-random-base, math-random-digit): Don't check to see if + var-RandSeed is bound. + (math-random-cache, math-gaussian-cache, calc-verbose-nextprime): + Declared them instead of just setting them. + (math-init-random-base): Made i a local variable. + (math-random-digit): Made math-random-last a local variable. + (math-prime-test-cache): Moved declaration to before it is used. + (math-prime-test-cache-k, math-prime-test-cache-q) + (math-prime-test-cache-nm1, math-prime-factors-finished): + Declared them as variables. + +2004-11-11 Jay Belanger + * calc/calc-ext.el (math-defcache): Use defvar for the new variables it creates. -- cgit v1.3 From be4b3ae8beb76dac0ed37fcfde2b84fc872602a1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 11 Nov 2004 21:45:57 +0000 Subject: (Info-search): Save match data for isearch. Skip Tag Table node. --- lisp/ChangeLog | 14 ++++++++++++++ lisp/info.el | 38 ++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 14 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df4c5c51e7a..23ab5b5d4ef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2004-11-11 Juri Linkov + + * info.el (Info-search): Save match data for isearch. + Skip Tag Table node. + + * descr-text.el (describe-char): Replace syntax-after with code + from its previous version. + + * files.el (magic-mode-alist): Use optimization for SGML mode too. + (set-auto-mode): Doc fix. Remove unused variable `xml'. + + * international/mule.el (sgml-html-meta-auto-coding-function): + Remove > after * calc/calc-comb.el (math-prime-factors-finished): Declared it as diff --git a/lisp/info.el b/lisp/info.el index baeec935ee7..cc7ed2ae59b 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1484,13 +1484,18 @@ If DIRECTION is `backward', search in the reverse direction." (1- (point))) (point-max))) (while (and (not give-up) - (or (null found) - (if backward - (isearch-range-invisible found beg-found) - (isearch-range-invisible beg-found found)) - ;; Skip node header line - (save-excursion (forward-line -1) - (looking-at "\^_")))) + (save-match-data + (or (null found) + (if backward + (isearch-range-invisible found beg-found) + (isearch-range-invisible beg-found found)) + ;; Skip node header line + (save-excursion (forward-line -1) + (looking-at "\^_")) + ;; Skip Tag Table node + (save-excursion + (and (search-backward "\^_" nil t) + (looking-at "\^_\nTag Table")))))) (if (if backward (re-search-backward regexp bound t) (re-search-forward regexp bound t)) @@ -1552,13 +1557,18 @@ If DIRECTION is `backward', search in the reverse direction." (setq list (cdr list)) (setq give-up nil found nil) (while (and (not give-up) - (or (null found) - (if backward - (isearch-range-invisible found beg-found) - (isearch-range-invisible beg-found found)) - ;; Skip node header line - (save-excursion (forward-line -1) - (looking-at "\^_")))) + (save-match-data + (or (null found) + (if backward + (isearch-range-invisible found beg-found) + (isearch-range-invisible beg-found found)) + ;; Skip node header line + (save-excursion (forward-line -1) + (looking-at "\^_")) + ;; Skip Tag Table node + (save-excursion + (and (search-backward "\^_" nil t) + (looking-at "\^_\nTag Table")))))) (if (if backward (re-search-backward regexp nil t) (re-search-forward regexp nil t)) -- cgit v1.3 From 977b50fb122c5480ec19d25ee4f4bb33dec0ddfb Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Nov 2004 22:44:46 +0000 Subject: Use push. (byte-compile-file-form-defalias): Rename from byte-compile-defalias. (defalias): Remove the `byte-compile' property and add a `byte-hunk-handler'. --- lisp/ChangeLog | 9 ++++++++- lisp/emacs-lisp/bytecomp.el | 28 +++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 23ab5b5d4ef..c2a6313752f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-11-11 Stefan Monnier + + * emacs-lisp/bytecomp.el: Use push. + (byte-compile-file-form-defalias): Rename from byte-compile-defalias. + (defalias): Remove the `byte-compile' property and add + a `byte-hunk-handler'. + 2004-11-11 Juri Linkov * info.el (Info-search): Save match data for isearch. @@ -36,7 +43,7 @@ 2004-11-11 Jay Belanger * calc/calc-ext.el (math-defcache): Use defvar for the new - variables it creates. + variables it creates. 2004-11-11 Lars Hansen diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index cb34b818107..ee29039e05e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1,7 +1,7 @@ ;;; bytecomp.el --- compilation of Lisp code into byte code -;; Copyright (C) 1985,86,87,92,94,1998,2000,01,02,03,2004 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, +;; 2003, 2004 Free Software Foundation, Inc. ;; Author: Jamie Zawinski ;; Hallvard Furuseth @@ -1215,9 +1215,8 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (if cons (or (memq n (cdr cons)) (setcdr cons (cons n (cdr cons)))) - (setq byte-compile-unresolved-functions - (cons (list (car form) n) - byte-compile-unresolved-functions))))))) + (push (list (car form) n) + byte-compile-unresolved-functions)))))) (defun byte-compile-format-warn (form) "Warn if FORM is `format'-like with inconsistent args. @@ -2129,9 +2128,9 @@ list that represents a doc string reference. (eq (car (nth 1 form)) 'quote) (consp (cdr (nth 1 form))) (symbolp (nth 1 (nth 1 form)))) - (add-to-list 'byte-compile-function-environment - (cons (nth 1 (nth 1 form)) - (cons 'autoload (cdr (cdr form)))))) + (push (cons (nth 1 (nth 1 form)) + (cons 'autoload (cdr (cdr form)))) + byte-compile-function-environment)) (if (stringp (nth 3 form)) form ;; No doc string, so we can compile this as a normal form. @@ -3614,7 +3613,6 @@ being undefined will be suppressed." (byte-defop-compiler-1 defconst byte-compile-defvar) (byte-defop-compiler-1 autoload) (byte-defop-compiler-1 lambda byte-compile-lambda-form) -(byte-defop-compiler-1 defalias) (defun byte-compile-defun (form) ;; This is not used for file-level defuns with doc strings. @@ -3716,7 +3714,8 @@ being undefined will be suppressed." (error "`lambda' used as function name is invalid")) ;; Compile normally, but deal with warnings for the function being defined. -(defun byte-compile-defalias (form) +(put 'defalias 'byte-hunk-handler 'byte-compile-file-form-defalias) +(defun byte-compile-file-form-defalias (form) (if (and (consp (cdr form)) (consp (nth 1 form)) (eq (car (nth 1 form)) 'quote) (consp (cdr (nth 1 form))) @@ -3728,10 +3727,9 @@ being undefined will be suppressed." (consp (cdr (nth 2 form))) (symbolp (nth 1 (nth 2 form)))))) (byte-compile-defalias-warn (nth 1 (nth 1 form))) - (setq byte-compile-function-environment - (cons (cons (nth 1 (nth 1 form)) - (if constant (nth 1 (nth 2 form)) t)) - byte-compile-function-environment)))) + (push (cons (nth 1 (nth 1 form)) + (if constant (nth 1 (nth 2 form)) t)) + byte-compile-function-environment))) (byte-compile-normal-call form)) ;; Turn off warnings about prior calls to the function being defalias'd. @@ -4116,5 +4114,5 @@ For example, invoke `emacs -batch -f batch-byte-recompile-directory .'." (run-hooks 'bytecomp-load-hook) -;;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a +;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a ;;; bytecomp.el ends here -- cgit v1.3 From 8cece98ad3550d39a23e4a3033e92e00274c91df Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Nov 2004 23:04:45 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 34 +++++++++++++++++++--------------- lisp/ChangeLog.7 | 21 ++++++++++----------- 2 files changed, 29 insertions(+), 26 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c2a6313752f..cdbe9ea2dab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2004-11-11 Stefan Monnier + * international/iso-cvt.el (iso-cvt-define-menu): Fix typo. + + * tooltip.el: Require CL. + * emacs-lisp/bytecomp.el: Use push. (byte-compile-file-form-defalias): Rename from byte-compile-defalias. (defalias): Remove the `byte-compile' property and add @@ -21,36 +25,36 @@ 2004-11-11 Jay Belanger - * calc/calc-comb.el (math-prime-factors-finished): Declared it as - a variable. - (calcFunc-dfac): Replaced unbound max by n. + * calc/calc-comb.el (math-prime-factors-finished): Declare it as + a variable. + (calcFunc-dfac): Replace unbound max by n. (math-stirling-local-cache): New variable. (math-stirling-number, math-stirling-1, math-stirling-2): - Replaced the variable `cache' by the declared variable - math-stirling-local-cache. - (var-RandSeed): Declared it as a variable. + Replace the variable `cache' by the declared variable + math-stirling-local-cache. + (var-RandSeed): Declare it as a variable. (math-init-random-base, math-random-digit): Don't check to see if - var-RandSeed is bound. + var-RandSeed is bound. (math-random-cache, math-gaussian-cache, calc-verbose-nextprime): - Declared them instead of just setting them. + Declare them instead of just setting them. (math-init-random-base): Made i a local variable. (math-random-digit): Made math-random-last a local variable. - (math-prime-test-cache): Moved declaration to before it is used. + (math-prime-test-cache): Move declaration to before it is used. (math-prime-test-cache-k, math-prime-test-cache-q) (math-prime-test-cache-nm1, math-prime-factors-finished): - Declared them as variables. + Declare them as variables. -2004-11-11 Jay Belanger +2004-11-11 Jay Belanger * calc/calc-ext.el (math-defcache): Use defvar for the new variables it creates. 2004-11-11 Lars Hansen - * desktop.el (desktop-buffer-mode-handlers, desktop-after-read-hook, - desktop-clear-preserve-buffers-regexp, desktop-file-name-format, - desktop-globals-to-clear, desktop-no-desktop-file-hook, desktop-path, - desktop-save): Add :version. + * desktop.el (desktop-buffer-mode-handlers, desktop-after-read-hook) + (desktop-clear-preserve-buffers-regexp, desktop-file-name-format) + (desktop-globals-to-clear, desktop-no-desktop-file-hook, desktop-path) + (desktop-save): Add :version. 2004-11-11 Stefan Monnier diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7 index 85dfaeaf35f..f89cb7b0d47 100644 --- a/lisp/ChangeLog.7 +++ b/lisp/ChangeLog.7 @@ -23104,8 +23104,8 @@ * message.el (message-mode): Delete abbrev mode initialization. (message-mode-hook): Move it here, instead, so the user can override it. - (message-y-or-n-p, message-talkative-question, - message-flatten-list, message-flatten-list-1): Move utility + (message-y-or-n-p, message-talkative-question) + (message-flatten-list, message-flatten-list-1): Move utility functions up so macro is defined before first invocation. * f90.el (f90-auto-fill-mode): Function deleted, all references @@ -23115,24 +23115,23 @@ 1996-08-13 Torbjorn Einarsson - * f90.el: (f90-do-auto-fill): Fixed bug which made program hang for + * f90.el: (f90-do-auto-fill): Fix bug which made program hang for space in fill-column. (f90-font-lock-keywords-1): Now we have common font-lock exps for Emacs and XEmacs - (f90-font-lock-keywords-2): Changed reg-exp for line number. A - number must be followed by a letter to be highlighted. Fixed - highlighting of declarations with trailing comments. - (f90-match-end): Fixed bug due to new message syntax. - (f90-mode): Fixed setup of variable font-lock-defaults. + (f90-font-lock-keywords-2): Change reg-exp for line number. + A number must be followed by a letter to be highlighted. + Fix highlighting of declarations with trailing comments. + (f90-match-end): Fix bug due to new message syntax. + (f90-mode): Fix setup of variable font-lock-defaults. (f90-looking-at-program-block-start): Small error in detecting of function start. Made the detection of subroutine start more flexible. (f90-mode-map): Much nicer menu with sections and added submenus for highlighting and keyword case change. Also added 'menu-enable' properties for region-based commands. - (f90-imenu-generic-expression): Fixed expression to find + (f90-imenu-generic-expression): Fix expression to find procedures, modules and types. - (f90-add-imenu-menu): New function for adding imenu menu to the - menubar. + (f90-add-imenu-menu): New function for adding imenu menu to the menubar. 1996-08-13 Richard Stallman -- cgit v1.3 From cf66c8aaa4c3b0721819022557715d77cbe566cb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 12 Nov 2004 00:13:36 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cdbe9ea2dab..226b0f86a9d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-11-12 Nick Roberts + + * tooltip.el (require): Explain why CL is needed. + 2004-11-11 Stefan Monnier * international/iso-cvt.el (iso-cvt-define-menu): Fix typo. -- cgit v1.3 From e22c7647c7ff33c846132f3d2877ac436b8b47e6 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Fri, 12 Nov 2004 02:14:03 +0000 Subject: fix to use new easymenu --- lisp/ChangeLog | 9 +++++++++ lisp/printing.el | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 226b0f86a9d..1496c47a09e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,15 @@ * tooltip.el (require): Explain why CL is needed. +2004-11-11 Vinicius Jose Latorre + + * printing.el: Insert :version into defgroup (printing). All reference + to Files option in menubar were changed to File. + (pr-version): New version number (6.8.2). + (pr-get-symbol): Call easy-menu-intern. + (pr-region-active-p): Now is a fun (it was defsubst). To avoid + compilation gripes. + 2004-11-11 Stefan Monnier * international/iso-cvt.el (iso-cvt-define-menu): Fix typo. diff --git a/lisp/printing.el b/lisp/printing.el index f466f33c830..003e6893428 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -5,13 +5,13 @@ ;; Author: Vinicius Jose Latorre ;; Maintainer: Vinicius Jose Latorre -;; Time-stamp: <2004/09/26 22:11:24 vinicius> +;; Time-stamp: <2004/11/11 23:54:13 vinicius> ;; Keywords: wp, print, PostScript -;; Version: 6.8.1 +;; Version: 6.8.2 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ -(defconst pr-version "6.8.1" - "printing.el, v 6.8.1 <2004/09/26 vinicius> +(defconst pr-version "6.8.2" + "printing.el, v 6.8.2 <2004/11/11 vinicius> Please send all bug fixes and enhancements to Vinicius Jose Latorre @@ -1099,6 +1099,7 @@ Unless optional argument INPLACE is non-nil, return a new string." :tag "Printing Utilities" :link '(emacs-library-link :tag "Source Lisp File" "printing.el") :prefix "pr-" + :version "20" :group 'wp :group 'postscript) @@ -2474,17 +2475,16 @@ See `pr-ps-printer-alist'.") (eval-and-compile (defun pr-get-symbol (name) - (or (intern-soft name) - (make-symbol name))) + (easy-menu-intern name)) (cond ((eq ps-print-emacs-type 'emacs) ; GNU Emacs - (defsubst pr-region-active-p () + (defun pr-region-active-p () (and pr-auto-region transient-mark-mode mark-active))) ((eq ps-print-emacs-type 'xemacs) ; XEmacs (defvar zmacs-region-stays nil) ; to avoid compilation gripes - (defsubst pr-region-active-p () + (defun pr-region-active-p () (and pr-auto-region (not zmacs-region-stays) (ps-mark-active-p))))) @@ -2904,18 +2904,18 @@ See `pr-ps-printer-alist'.") (pr-get-symbol "Printing"))))) ;; Emacs 21 (pr-menu-print-item - (easy-menu-change '("files") "Print" pr-menu-spec "print-buffer") + (easy-menu-change '("file") "Print" pr-menu-spec "print-buffer") (let ((items '("print-buffer" "print-region" "ps-print-buffer-faces" "ps-print-region-faces" "ps-print-buffer" "ps-print-region"))) (while items - (easy-menu-remove-item nil '("files") (car items)) + (easy-menu-remove-item nil '("file") (car items)) (setq items (cdr items))) (setq pr-menu-print-item nil - pr-menu-bar (vector 'menu-bar 'files + pr-menu-bar (vector 'menu-bar 'file (pr-get-symbol "Print"))))) (t - (easy-menu-change '("files") "Print" pr-menu-spec))) + (easy-menu-change '("file") "Print" pr-menu-spec))) ;; Key binding (global-set-key [print] 'pr-ps-fast-fire) -- cgit v1.3 From 036cf769ad82564e8e18da37c0d9df65fe8f4752 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 12 Nov 2004 04:06:13 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1496c47a09e..d07a3c7ffba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -13,6 +13,21 @@ 2004-11-11 Stefan Monnier + * emacs-lisp/byte-opt.el (byte-compile-inline-expand): Understand the + new byte-compile-function-environment binding to t. + + * font-lock.el (font-lock-fontify-syntactically-region): + Don't forget to highlight the last char when we hit `end'. + + * mwheel.el (mouse-wheel-progressive-speed): Fix typo in name. + (mwheel-scroll): Adjust accordingly. + + * cvs-status.el: Reduce spurious warnings. + (cvs-status-checkout): Remove. + (cvs-status-mode-map): Use cvs-mode-checkout instead. + + * pcvs.el (cvs-mode-checkout): New command. + * international/iso-cvt.el (iso-cvt-define-menu): Fix typo. * tooltip.el: Require CL. -- cgit v1.3 From 63cd573484da1c6ea1859da890bbf4e3412e106f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 12 Nov 2004 16:56:09 +0000 Subject: (desktop-create-buffer, desktop-save): Avoid some consing by using mapc instead of mapcar. --- lisp/ChangeLog | 5 +++++ lisp/desktop.el | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d07a3c7ffba..e867fa3de48 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-12 Kevin Rodgers (tiny change) + + * desktop.el (desktop-create-buffer, desktop-save): Avoid some + consing by using mapc instead of mapcar. + 2004-11-12 Nick Roberts * tooltip.el (require): Explain why CL is needed. diff --git a/lisp/desktop.el b/lisp/desktop.el index 0a423aa7c42..55ebd662df6 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -636,7 +636,7 @@ See also `desktop-base-file-name'." ";; Desktop file format version " desktop-file-version "\n" ";; Emacs version " emacs-version "\n\n" ";; Global section:\n") - (mapcar (function desktop-outvar) desktop-globals-to-save) + (mapc (function desktop-outvar) desktop-globals-to-save) (if (memq 'kill-ring desktop-globals-to-save) (insert "(setq kill-ring-yank-pointer (nthcdr " @@ -644,15 +644,15 @@ See also `desktop-base-file-name'." " kill-ring))\n")) (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n") - (mapcar #'(lambda (l) - (if (apply 'desktop-save-buffer-p l) - (progn - (insert "(desktop-create-buffer " desktop-file-version) - (mapcar #'(lambda (e) - (insert "\n " (desktop-value-to-string e))) - l) - (insert ")\n\n")))) - info) + (mapc #'(lambda (l) + (if (apply 'desktop-save-buffer-p l) + (progn + (insert "(desktop-create-buffer " desktop-file-version) + (mapc #'(lambda (e) + (insert "\n " (desktop-value-to-string e))) + l) + (insert ")\n\n")))) + info) (setq default-directory dirname) (when (file-exists-p filename) (delete-file filename)) (let ((coding-system-for-write 'emacs-mule)) @@ -873,9 +873,9 @@ directory DIRNAME." ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible (auto-fill-mode 0)) (t - (mapcar #'(lambda (minor-mode) - (when (functionp minor-mode) (funcall minor-mode 1))) - desktop-buffer-minor-modes))) + (mapc #'(lambda (minor-mode) + (when (functionp minor-mode) (funcall minor-mode 1))) + desktop-buffer-minor-modes))) ;; Even though point and mark are non-nil when written by `desktop-save' ;; they may be modified by handlers wanting to set point or mark themselves. (when desktop-buffer-point -- cgit v1.3 From 7c7d40755ab10f374dd656e9f0e5f2a158ae9edb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 12 Nov 2004 17:03:56 +0000 Subject: (rmail-spam-filter): Only check white list if `message-sender' is non-nil. --- lisp/ChangeLog | 5 +++++ lisp/mail/rmail-spam-filter.el | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e867fa3de48..d37206b261c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-11-12 Diane Murray (tiny change) + + * mail/rmail-spam-filter.el (rmail-spam-filter): Only check white + list if `message-sender' is non-nil. + 2004-11-12 Kevin Rodgers (tiny change) * desktop.el (desktop-create-buffer, desktop-save): Avoid some diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index 43177b7c99b..c7fc8a0da03 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el @@ -302,13 +302,14 @@ it from rmail file. Called for each new message retrieved by ;; Check white list, and likewise cause while loop ;; bypass. - (if (let ((white-list rsf-white-list) - (found nil)) - (while (and (not found) white-list) - (if (string-match (car white-list) message-sender) - (setq found t) - (setq white-list (cdr white-list)))) - found) + (if (and message-sender + (let ((white-list rsf-white-list) + (found nil)) + (while (and (not found) white-list) + (if (string-match (car white-list) message-sender) + (setq found t) + (setq white-list (cdr white-list)))) + found)) (setq exit-while-loop t maybe-spam nil this-is-a-spam-email nil)) -- cgit v1.3 From f431a91000637a53f52b90fa9a8260b6216df2ed Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 12 Nov 2004 17:10:38 +0000 Subject: (rmail-get-new-mail): Use the renamed variables `rsf-beep' and `rsf-sleep-after-message'. --- lisp/ChangeLog | 3 +++ lisp/mail/rmail.el | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d37206b261c..7e662c8c5b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2004-11-12 Diane Murray (tiny change) + * mail/rmail.el (rmail-get-new-mail): Use the renamed variables + `rsf-beep' and `rsf-sleep-after-message'. + * mail/rmail-spam-filter.el (rmail-spam-filter): Only check white list if `message-sender' is non-nil. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index f8e31dfda04..a7524cc8246 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1504,8 +1504,8 @@ It returns t if it got any new messages." (if (and (featurep 'rmail-spam-filter) rmail-use-spam-filter (> rsf-number-of-spam 0)) - (progn (if rmail-spam-filter-beep (beep t)) - (sleep-for rmail-spam-sleep-after-message))) + (progn (if rsf-beep (beep t)) + (sleep-for rsf-sleep-after-message))) ;; Move to the first new message ;; unless we have other unseen messages before it. -- cgit v1.3 From 68d1b30d251b4771f739d20f507cd9523ae3919b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 12 Nov 2004 22:35:21 +0000 Subject: (calc-dumb-map): Declared it. (calc-graph-show-dumb): Check if calc-dumb-map is non-nil rather than unbound. (calc-graph-name): Made `end' a local variable. (calc-graph-lookup): Made `varname' a local variable. (var-DUMMY, var-DUMMY2, var-PlotRejects, calc-gnuplot-trail-mark): Declared them. (calc-graph-format-data): Don't check if var-PlotRejects is bound. (calc-graph-plot, calc-graph-compute-3d): Removed references to the unused variable y3vec. (calc-graph-show-dumb): Removed reference to unused variable found-pt. (calc-graph-kill-hook, calc-graph-plot): Removed reference to calc-graph-prev-kill-hook. (calc-graph-yvalue, calc-graph-yvec, calc-graph-numsteps, calc-graph-numsteps3, calc-graph-xvalue, calc-graph-xvec, calc-graph-xname, calc-graph-yname, calc-graph-xstep, calc-graph-ycache, calc-graph-ycacheptr, calc-graph-refine, calc-graph-keep-file, calc-graph-xval, calc-graph-xlow, calc-graph-xhigh, calc-graph-yval, calc-graph-yp, calc-graph-xp, calc-graph-zp, calc-graph-yvector, calc-graph-resolution, calc-graph-y3value, calc-graph-y3name, calc-graph-y3step, calc-graph-y3step, calc-graph-zval, calc-graph-stepcount, calc-graph-is-splot, calc-graph-surprise-splot, calc-graph-blank, calc-graph-non-blank, calc-graph-curve-num): New variables. (calc-graph-plot, calc-graph-compute-2d, calc-graph-refine-2d) (calc-graph-recompute-2d, calc-graph-compute-3d, calc-graph-format-data): Replaced undeclared variables with the above declared variables. --- lisp/ChangeLog | 41 +++ lisp/calc/calc-graph.el | 688 +++++++++++++++++++++++++----------------------- 2 files changed, 405 insertions(+), 324 deletions(-) (limited to 'lisp/ChangeLog') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7e662c8c5b2..b443f53ebba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,44 @@ +2004-11-12 Jay Belanger + + * calc/calc-graph.el (calc-dumb-map): Declared it. + (calc-graph-show-dumb): Check if calc-dumb-map is non-nil rather + than unbound. + + (calc-graph-name): Made `end' a local variable. + (calc-graph-lookup): Made `varname' a local variable. + + (var-DUMMY, var-DUMMY2, var-PlotRejects, calc-gnuplot-trail-mark): + Declared them. + + (calc-graph-format-data): Don't check if var-PlotRejects is + bound. + + (calc-graph-plot, calc-graph-compute-3d): Removed references to + the unused variable y3vec. + + (calc-graph-show-dumb): Removed reference to unused variable + found-pt. + + (calc-graph-kill-hook, calc-graph-plot): Removed reference to + calc-graph-prev-kill-hook. + + (calc-graph-yvalue, calc-graph-yvec, calc-graph-numsteps) + (calc-graph-numsteps3, calc-graph-xvalue, calc-graph-xvec) + (calc-graph-xname, calc-graph-yname, calc-graph-xstep) + (calc-graph-ycache, calc-graph-ycacheptr, calc-graph-refine) + (calc-graph-keep-file, calc-graph-xval, calc-graph-xlow) + (calc-graph-xhigh, calc-graph-yval, calc-graph-yp, calc-graph-xp) + (calc-graph-zp, calc-graph-yvector, calc-graph-resolution) + (calc-graph-y3value, calc-graph-y3name) + (calc-graph-y3step, calc-graph-y3step, calc-graph-zval) + (calc-graph-stepcount, calc-graph-is-splot) + (calc-graph-surprise-splot, calc-graph-blank) + (calc-graph-non-blank, calc-graph-curve-num): New variables. + (calc-graph-plot, calc-graph-compute-2d, calc-graph-refine-2d) + (calc-graph-recompute-2d, calc-graph-compute-3d) + (calc-graph-format-data): Replaced undeclared variables with the + above newly declared variables. + 2004-11-12 Diane Murray (tiny change) * mail/rmail.el (rmail-get-new-mail): Use the renamed variables diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index cec7a5d2136..ff537109816 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -66,6 +66,7 @@ (defvar calc-graph-data-cache-limit 10) (defvar calc-graph-no-auto-view nil) (defvar calc-graph-no-wait nil) +(defvar calc-gnuplot-trail-mark) (defun calc-graph-fast (many) (interactive "P") @@ -224,11 +225,10 @@ thing (let ((found (assoc thing calc-graph-var-cache))) (or found - (progn - (setq varname (concat "PlotData" - (int-to-string - (1+ (length calc-graph-var-cache)))) - var (list 'var (intern varname) + (let ((varname (concat "PlotData" + (int-to-string + (1+ (length calc-graph-var-cache)))))) + (setq var (list 'var (intern varname) (intern (concat "var-" varname))) found (cons thing var) calc-graph-var-cache (cons found calc-graph-var-cache)) @@ -275,6 +275,47 @@ (interactive "P") (calc-graph-plot flag t)) +(defvar var-DUMMY) +(defvar var-DUMMY2) +(defvar var-PlotRejects) + +;; The following variables are local to calc-graph-plot, but are +;; used in the functions calc-graph-compute-2d, calc-graph-refine-2d, +;; calc-graph-recompute-2d, calc-graph-compute-3d and +;; calc-graph-format-data, which are called by calc-graph-plot. +(defvar calc-graph-yvalue) +(defvar calc-graph-yvec) +(defvar calc-graph-numsteps) +(defvar calc-graph-numsteps3) +(defvar calc-graph-xvalue) +(defvar calc-graph-xvec) +(defvar calc-graph-xname) +(defvar calc-graph-yname) +(defvar calc-graph-xstep) +(defvar calc-graph-ycache) +(defvar calc-graph-ycacheptr) +(defvar calc-graph-refine) +(defvar calc-graph-keep-file) +(defvar calc-graph-xval) +(defvar calc-graph-xlow) +(defvar calc-graph-xhigh) +(defvar calc-graph-yval) +(defvar calc-graph-yp) +(defvar calc-graph-xp) +(defvar calc-graph-zp) +(defvar calc-graph-yvector) +(defvar calc-graph-resolution) +(defvar calc-graph-y3value) +(defvar calc-graph-y3name) +(defvar calc-graph-y3step) +(defvar calc-graph-zval) +(defvar calc-graph-stepcount) +(defvar calc-graph-is-splot) +(defvar calc-graph-surprise-splot) +(defvar calc-graph-blank) +(defvar calc-graph-non-blank) +(defvar calc-graph-curve-num) + (defun calc-graph-plot (flag &optional printing) (interactive "P") (calc-slow-wrapper @@ -282,22 +323,20 @@ (tempbuf (get-buffer-create "*Gnuplot Temp-2*")) (tempbuftop 1) (tempoutfile nil) - (curve-num 0) - (refine (and flag (> (prefix-numeric-value flag) 0))) + (calc-graph-curve-num 0) + (calc-graph-refine (and flag (> (prefix-numeric-value flag) 0))) (recompute (and flag (< (prefix-numeric-value flag) 0))) - (surprise-splot nil) + (calc-graph-surprise-splot nil) (tty-output nil) - cache-env is-splot device output resolution precision samples-pos) - (or (boundp 'calc-graph-prev-kill-hook) - (setq calc-graph-prev-kill-hook nil) - (add-hook 'kill-emacs-hook 'calc-graph-kill-hook)) + cache-env calc-graph-is-splot device output calc-graph-resolution precision samples-pos) + (add-hook 'kill-emacs-hook 'calc-graph-kill-hook) (save-excursion (calc-graph-init) (set-buffer tempbuf) (erase-buffer) (set-buffer calc-gnuplot-input) (goto-char (point-min)) - (setq is-splot (re-search-forward "^splot[ \t]" nil t)) + (setq calc-graph-is-splot (re-search-forward "^splot[ \t]" nil t)) (let ((str (buffer-string)) (ver calc-gnuplot-version)) (set-buffer (get-buffer-create "*Gnuplot Temp*")) @@ -313,14 +352,14 @@ "set nogrid\nset nokey\nset nopolar\n")) (if (>= ver 3) (insert "set surface\nset nocontour\n" - "set " (if is-splot "" "no") "parametric\n" + "set " (if calc-graph-is-splot "" "no") "parametric\n" "set notime\nset border\nset ztics\nset zeroaxis\n" "set view 60,30,1,1\nset offsets 0,0,0,0\n")) (setq samples-pos (point)) (insert "\n\n" str)) (goto-char (point-min)) - (if is-splot - (if refine + (if calc-graph-is-splot + (if calc-graph-refine (error "This option works only for 2d plots") (setq recompute t))) (let ((calc-gnuplot-input (current-buffer)) @@ -366,10 +405,10 @@ (if (equal output "STDOUT") "" (prin1-to-string output))))) - (setq resolution (calc-graph-find-command "samples")) - (if resolution - (setq resolution (string-to-int resolution)) - (setq resolution (if is-splot + (setq calc-graph-resolution (calc-graph-find-command "samples")) + (if calc-graph-resolution + (setq calc-graph-resolution (string-to-int calc-graph-resolution)) + (setq calc-graph-resolution (if calc-graph-is-splot calc-graph-default-resolution-3d calc-graph-default-resolution))) (setq precision (calc-graph-find-command "precision")) @@ -381,8 +420,8 @@ (calc-graph-set-command "samples") (calc-graph-set-command "precision")) (goto-char samples-pos) - (insert "set samples " (int-to-string (max (if is-splot 20 200) - (+ 5 resolution))) "\n") + (insert "set samples " (int-to-string (max (if calc-graph-is-splot 20 200) + (+ 5 calc-graph-resolution))) "\n") (while (re-search-forward "{\\*[^}]+}[^,\n]*" nil t) (delete-region (match-beginning 0) (match-end 0)) (if (looking-at ",") @@ -398,7 +437,7 @@ calc-simplify-mode calc-infinite-mode calc-word-size - precision is-splot)) + precision calc-graph-is-splot)) (if (and (not recompute) (equal (cdr (car calc-graph-data-cache)) cache-env)) (while (> (length calc-graph-data-cache) @@ -408,88 +447,88 @@ (setq calc-graph-data-cache (list (cons nil cache-env))))) (calc-graph-find-plot t t) (while (re-search-forward - (if is-splot + (if calc-graph-is-splot "{\\([^{}:\n]+\\):\\([^{}:\n]+\\):\\([^{}:\n]+\\)}" "{\\([^{}:\n]+\\)\\(:\\)\\([^{}:\n]+\\)}") nil t) - (setq curve-num (1+ curve-num)) - (let* ((xname (buffer-substring (match-beginning 1) (match-end 1))) - (xvar (intern (concat "var-" xname))) - (xvalue (math-evaluate-expr (calc-var-value xvar))) - (y3name (and is-splot + (setq calc-graph-curve-num (1+ calc-graph-curve-num)) + (let* ((calc-graph-xname (buffer-substring (match-beginning 1) (match-end 1))) + (xvar (intern (concat "var-" calc-graph-xname))) + (calc-graph-xvalue (math-evaluate-expr (calc-var-value xvar))) + (calc-graph-y3name (and calc-graph-is-splot (buffer-substring (match-beginning 2) (match-end 2)))) - (y3var (and is-splot (intern (concat "var-" y3name)))) - (y3value (and is-splot (calc-var-value y3var))) - (yname (buffer-substring (match-beginning 3) (match-end 3))) - (yvar (intern (concat "var-" yname))) - (yvalue (calc-var-value yvar)) + (y3var (and calc-graph-is-splot (intern (concat "var-" calc-graph-y3name)))) + (calc-graph-y3value (and calc-graph-is-splot (calc-var-value y3var))) + (calc-graph-yname (buffer-substring (match-beginning 3) (match-end 3))) + (yvar (intern (concat "var-" calc-graph-yname))) + (calc-graph-yvalue (calc-var-value yvar)) filename) (delete-region (match-beginning 0) (match-end 0)) - (setq filename (calc-temp-file-name curve-num)) + (setq filename (calc-temp-file-name calc-graph-curve-num)) (save-excursion (set-buffer calcbuf) (let (tempbuftop - (xp xvalue) - (yp yvalue) - (zp nil) - (xlow nil) (xhigh nil) (y3low nil) (y3high nil) - xvec xval xstep var-DUMMY - y3vec y3val y3step var-DUMMY2 (zval nil) - yvec yval ycache ycacheptr yvector - numsteps numsteps3 - (keep-file (and (not is-splot) (file-exists-p filename))) - (stepcount 0) + (calc-graph-xp calc-graph-xvalue) + (calc-graph-yp calc-graph-yvalue) + (calc-graph-zp nil) + (calc-graph-xlow nil) (calc-graph-xhigh nil) (y3low nil) (y3high nil) + calc-graph-xvec calc-graph-xval calc-graph-xstep var-DUMMY + y3val calc-graph-y3step var-DUMMY2 (calc-graph-zval nil) + calc-graph-yvec calc-graph-yval calc-graph-ycache calc-graph-ycacheptr calc-graph-yvector + calc-graph-numsteps calc-graph-numsteps3 + (calc-graph-keep-file (and (not calc-graph-is-splot) (file-exists-p filename))) + (calc-graph-stepcount 0) (calc-symbolic-mode nil) (calc-prefer-frac nil) (calc-internal-prec (max 3 precision)) (calc-simplify-mode (and (not (memq calc-simplify-mode '(none num))) calc-simplify-mode)) - (blank t) - (non-blank nil) + (calc-graph-blank t) + (calc-graph-non-blank nil) (math-working-step 0) (math-working-step-2 nil)) (save-excursion - (if is-splot + (if calc-graph-is-splot (calc-graph-compute-3d) (calc-graph-compute-2d)) (set-buffer tempbuf) (goto-char (point-max)) - (insert "\n" xname) - (if is-splot - (insert ":" y3name)) - (insert ":" yname "\n\n") + (insert "\n" calc-graph-xname) + (if calc-graph-is-splot + (insert ":" calc-graph-y3name)) + (insert ":" calc-graph-yname "\n\n") (setq tempbuftop (point)) (let ((calc-group-digits nil) (calc-leading-zeros nil) (calc-number-radix 10) - (entry (and (not is-splot) - (list xp yp xhigh numsteps)))) + (entry (and (not calc-graph-is-splot) + (list calc-graph-xp calc-graph-yp calc-graph-xhigh calc-graph-numsteps)))) (or (equal entry - (nth 1 (nth (1+ curve-num) + (nth 1 (nth (1+ calc-graph-curve-num) calc-graph-file-cache))) - (setq keep-file nil)) - (setcar (cdr (nth (1+ curve-num) calc-graph-file-cache)) + (setq calc-graph-keep-file nil)) + (setcar (cdr (nth (1+ calc-graph-curve-num) calc-graph-file-cache)) entry) - (or keep-file + (or calc-graph-keep-file (calc-graph-format-data))) - (or keep-file + (or calc-graph-keep-file (progn - (or non-blank + (or calc-graph-non-blank (error "No valid data points for %s:%s" - xname yname)) + calc-graph-xname calc-graph-yname)) (write-region tempbuftop (point-max) filename nil 'quiet)))))) (insert (prin1-to-string filename)))) - (if surprise-splot + (if calc-graph-surprise-splot (setcdr cache-env nil)) - (if (= curve-num 0) + (if (= calc-graph-curve-num 0) (progn (calc-gnuplot-command "clear") (calc-clear-command-flag 'clear-message) (message "No data to plot!")) - (setq calc-graph-data-cache-limit (max curve-num + (setq calc-graph-data-cache-limit (max calc-graph-curve-num calc-graph-data-cache-limit) filename (calc-temp-file-name 0)) (write-region (point-min) (point-max) filename nil 'quiet) @@ -517,325 +556,325 @@ (eval command)))))))))) (defun calc-graph-compute-2d () - (if (setq yvec (eq (car-safe yvalue) 'vec)) - (if (= (setq numsteps (1- (length yvalue))) 0) + (if (setq calc-graph-yvec (eq (car-safe calc-graph-yvalue) 'vec)) + (if (= (setq calc-graph-numsteps (1- (length calc-graph-yvalue))) 0) (error "Can't plot an empty vector") - (if (setq xvec (eq (car-safe xvalue) 'vec)) - (or (= (1- (length xvalue)) numsteps) - (error "%s and %s have different lengths" xname yname)) - (if (and (eq (car-safe xvalue) 'intv) - (math-constp xvalue)) - (setq xstep (math-div (math-sub (nth 3 xvalue) - (nth 2 xvalue)) - (1- numsteps)) - xvalue (nth 2 xvalue)) - (if (math-realp xvalue) - (setq xstep 1) - (error "%s is not a suitable basis for %s" xname yname))))) - (or (math-realp yvalue) + (if (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 'vec)) + (or (= (1- (length calc-graph-xvalue)) calc-graph-numsteps) + (error "%s and %s have different lengths" calc-graph-xname calc-graph-yname)) + (if (and (eq (car-safe calc-graph-xvalue) 'intv) + (math-constp calc-graph-xvalue)) + (setq calc-graph-xstep (math-div (math-sub (nth 3 calc-graph-xvalue) + (nth 2 calc-graph-xvalue)) + (1- calc-graph-numsteps)) + calc-graph-xvalue (nth 2 calc-graph-xvalue)) + (if (math-realp calc-graph-xvalue) + (setq calc-graph-xstep 1) + (error "%s is not a suitable basis for %s" calc-graph-xname calc-graph-yname))))) + (or (math-realp calc-graph-yvalue) (let ((arglist nil)) - (setq yvalue (math-evaluate-expr yvalue)) - (calc-default-formula-arglist yvalue) + (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue)) + (calc-default-formula-arglist calc-graph-yvalue) (or arglist - (error "%s does not contain any unassigned variables" yname)) + (error "%s does not contain any unassigned variables" calc-graph-yname)) (and (cdr arglist) (error "%s contains more than one variable: %s" - yname arglist)) - (setq yvalue (math-expr-subst yvalue + calc-graph-yname arglist)) + (setq calc-graph-yvalue (math-expr-subst calc-graph-yvalue (math-build-var-name (car arglist)) '(var DUMMY var-DUMMY))))) - (setq ycache (assoc yvalue calc-graph-data-cache)) - (delq ycache calc-graph-data-cache) + (setq calc-graph-ycache (assoc calc-graph-yvalue calc-graph-data-cache)) + (delq calc-graph-ycache calc-graph-data-cache) (nconc calc-graph-data-cache - (list (or ycache (setq ycache (list yvalue))))) - (if (and (not (setq xvec (eq (car-safe xvalue) 'vec))) - refine (cdr (cdr ycache))) + (list (or calc-graph-ycache (setq calc-graph-ycache (list calc-graph-yvalue))))) + (if (and (not (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 'vec))) + calc-graph-refine (cdr (cdr calc-graph-ycache))) (calc-graph-refine-2d) (calc-graph-recompute-2d)))) (defun calc-graph-refine-2d () - (setq keep-file nil - ycacheptr (cdr ycache)) - (if (and (setq xval (calc-graph-find-command "xrange")) + (setq calc-graph-keep-file nil + calc-graph-ycacheptr (cdr calc-graph-ycache)) + (if (and (setq calc-graph-xval (calc-graph-find-command "xrange")) (string-match "\\`\\[\\([0-9.eE+-]*\\):\\([0-9.eE+-]*\\)\\]\\'" - xval)) + calc-graph-xval)) (let ((b2 (match-beginning 2)) (e2 (match-end 2))) - (setq xlow (math-read-number (substring xval + (setq calc-graph-xlow (math-read-number (substring calc-graph-xval (match-beginning 1) (match-end 1))) - xhigh (math-read-number (substring xval b2 e2)))) - (if xlow - (while (and (cdr ycacheptr) - (Math-lessp (car (nth 1 ycacheptr)) xlow)) - (setq ycacheptr (cdr ycacheptr))))) - (setq math-working-step-2 (1- (length ycacheptr))) - (while (and (cdr ycacheptr) - (or (not xhigh) - (Math-lessp (car (car ycacheptr)) xhigh))) - (setq var-DUMMY (math-div (math-add (car (car ycacheptr)) - (car (nth 1 ycacheptr))) + calc-graph-xhigh (math-read-number (substring calc-graph-xval b2 e2)))) + (if calc-graph-xlow + (while (and (cdr calc-graph-ycacheptr) + (Math-lessp (car (nth 1 calc-graph-ycacheptr)) calc-graph-xlow)) + (setq calc-graph-ycacheptr (cdr calc-graph-ycacheptr))))) + (setq math-working-step-2 (1- (length calc-graph-ycacheptr))) + (while (and (cdr calc-graph-ycacheptr) + (or (not calc-graph-xhigh) + (Math-lessp (car (car calc-graph-ycacheptr)) calc-graph-xhigh))) + (setq var-DUMMY (math-div (math-add (car (car calc-graph-ycacheptr)) + (car (nth 1 calc-graph-ycacheptr))) 2) math-working-step (1+ math-working-step) - yval (math-evaluate-expr yvalue)) - (setcdr ycacheptr (cons (cons var-DUMMY yval) - (cdr ycacheptr))) - (setq ycacheptr (cdr (cdr ycacheptr)))) - (setq yp ycache - numsteps 1000000)) + calc-graph-yval (math-evaluate-expr calc-graph-yvalue)) + (setcdr calc-graph-ycacheptr (cons (cons var-DUMMY calc-graph-yval) + (cdr calc-graph-ycacheptr))) + (setq calc-graph-ycacheptr (cdr (cdr calc-graph-ycacheptr)))) + (setq calc-graph-yp calc-graph-ycache + calc-graph-numsteps 1000000)) (defun calc-graph-recompute-2d () - (setq ycacheptr ycache) - (if xvec - (setq numsteps (1- (length xvalue)) - yvector nil) - (if (and (eq (car-safe xvalue) 'intv) - (math-constp xvalue)) - (setq numsteps resolution - yp nil - xlow (nth 2 xvalue) - xhigh (nth 3 xvalue) - xstep (math-div (math-sub xhigh xlow) - (1- numsteps)) - xvalue (nth 2 xvalue)) + (setq calc-graph-ycacheptr calc-graph-ycache) + (if calc-graph-xvec + (setq calc-graph-numsteps (1- (length calc-graph-xvalue)) + calc-graph-yvector nil) + (if (and (eq (car-safe calc-graph-xvalue) 'intv) + (math-constp calc-graph-xvalue)) + (setq calc-graph-numsteps calc-graph-resolution + calc-graph-yp nil + calc-graph-xlow (nth 2 calc-graph-xvalue) + calc-graph-xhigh (nth 3 calc-graph-xvalue) + calc-graph-xstep (math-div (math-sub calc-graph-xhigh calc-graph-xlow) + (1- calc-graph-numsteps)) + calc-graph-xvalue (nth 2 calc-graph-xvalue)) (error "%s is not a suitable basis for %s" - xname yname))) - (setq math-working-step-2 numsteps) - (while (>= (setq numsteps (1- numsteps)) 0) + calc-graph-xname calc-graph-yname))) + (setq math-working-step-2 calc-graph-numsteps) + (while (>= (setq calc-graph-numsteps (1- calc-graph-numsteps)) 0) (setq math-working-step (1+ math-working-step)) - (if xvec + (if calc-graph-xvec (progn - (setq xp (cdr xp) - xval (car xp)) - (and (not (eq ycacheptr ycache)) - (consp (car ycacheptr)) - (not (Math-lessp (car (car ycacheptr)) xval)) - (setq ycacheptr ycache))) - (if (= numsteps 0) - (setq xval xhigh) ; avoid cumulative roundoff - (setq xval xvalue - xvalue (math-add xvalue xstep)))) - (while (and (cdr ycacheptr) - (Math-lessp (car (nth 1 ycacheptr)) xval)) - (setq ycacheptr (cdr ycacheptr))) - (or (and (cdr ycacheptr) - (Math-equal (car (nth 1 ycacheptr)) xval)) + (setq calc-graph-xp (cdr calc-graph-xp) + calc-graph-xval (car calc-graph-xp)) + (and (not (eq calc-graph-ycacheptr calc-graph-ycache)) + (consp (car calc-graph-ycacheptr)) + (not (Math-lessp (car (car calc-graph-ycacheptr)) calc-graph-xval)) + (setq calc-graph-ycacheptr calc-graph-ycache))) + (if (= calc-graph-numsteps 0) + (setq calc-graph-xval calc-graph-xhigh) ; avoid cumulative roundoff + (setq calc-graph-xval calc-graph-xvalue + calc-graph-xvalue (math-add calc-graph-xvalue calc-graph-xstep)))) + (while (and (cdr calc-graph-ycacheptr) + (Math-lessp (car (nth 1 calc-graph-ycacheptr)) calc-graph-xval)) + (setq calc-graph-ycacheptr (cdr calc-graph-ycacheptr))) + (or (and (cdr calc-graph-ycacheptr) + (Math-equal (car (nth 1 calc-graph-ycacheptr)) calc-graph-xval)) (progn - (setq keep-file nil - var-DUMMY xval) - (setcdr ycacheptr (cons (cons xval (math-evaluate-expr yvalue)) - (cdr ycacheptr))))) - (setq ycacheptr (cdr ycacheptr)) - (if xvec - (setq yvector (cons (cdr (car ycacheptr)) yvector)) - (or yp (setq yp ycacheptr)))) - (if xvec - (setq xp xvalue - yvec t - yp (cons 'vec (nreverse yvector)) - numsteps (1- (length xp))) - (setq numsteps 1000000))) + (setq calc-graph-keep-file nil + var-DUMMY calc-graph-xval) + (setcdr calc-graph-ycacheptr (cons (cons calc-graph-xval (math-evaluate-expr calc-graph-yvalue)) + (cdr calc-graph-ycacheptr))))) + (setq calc-graph-ycacheptr (cdr calc-graph-ycacheptr)) + (if calc-graph-xvec + (setq calc-graph-yvector (cons (cdr (car calc-graph-ycacheptr)) calc-graph-yvector)) + (or calc-graph-yp (setq calc-graph-yp calc-graph-ycacheptr)))) + (if calc-graph-xvec + (setq calc-graph-xp calc-graph-xvalue + calc-graph-yvec t + calc-graph-yp (cons 'vec (nreverse calc-graph-yvector)) + calc-graph-numsteps (1- (length calc-graph-xp))) + (setq calc-graph-numsteps 1000000))) (defun calc-graph-compute-3d () - (if (setq yvec (eq (car-safe yvalue) 'vec)) - (if (math-matrixp yvalue) + (if (setq calc-graph-yvec (eq (car-safe calc-graph-yvalue) 'vec)) + (if (math-matrixp calc-graph-yvalue) (progn - (setq numsteps (1- (length yvalue)) - numsteps3 (1- (length (nth 1 yvalue)))) - (if (eq (car-safe xvalue) 'vec) - (or (= (1- (length xvalue)) numsteps) - (error "%s has wrong length" xname)) - (if (and (eq (car-safe xvalue) 'intv) - (math-constp xvalue)) - (setq xvalue (calcFunc-index numsteps - (nth 2 xvalue) + (setq calc-graph-numsteps (1- (length calc-graph-yvalue)) + calc-graph-numsteps3 (1- (length (nth 1 calc-graph-yvalue)))) + (if (eq (car-safe calc-graph-xvalue) 'vec) + (or (= (1- (length calc-graph-xvalue)) calc-graph-numsteps) + (error "%s has wrong length" calc-graph-xname)) + (if (and (eq (car-safe calc-graph-xvalue) 'intv) + (math-constp calc-graph-xvalue)) + (setq calc-graph-xvalue (calcFunc-index calc-graph-numsteps + (nth 2 calc-graph-xvalue) (math-div - (math-sub (nth 3 xvalue) - (nth 2 xvalue)) - (1- numsteps)))) - (if (math-realp xvalue) - (setq xvalue (calcFunc-index numsteps xvalue 1)) - (error "%s is not a suitable basis for %s" xname yname)))) - (if (eq (car-safe y3value) 'vec) - (or (= (1- (length y3value)) numsteps3) - (error "%s has wrong length" y3name)) - (if (and (eq (car-safe y3value) 'intv) - (math-constp y3value)) - (setq y3value (calcFunc-index numsteps3 - (nth 2 y3value) + (math-sub (nth 3 calc-graph-xvalue) + (nth 2 calc-graph-xvalue)) + (1- calc-graph-numsteps)))) + (if (math-realp calc-graph-xvalue) + (setq calc-graph-xvalue (calcFunc-index calc-graph-numsteps calc-graph-xvalue 1)) + (error "%s is not a suitable basis for %s" calc-graph-xname calc-graph-yname)))) + (if (eq (car-safe calc-graph-y3value) 'vec) + (or (= (1- (length calc-graph-y3value)) calc-graph-numsteps3) + (error "%s has wrong length" calc-graph-y3name)) + (if (and (eq (car-safe calc-graph-y3value) 'intv) + (math-constp calc-graph-y3value)) + (setq calc-graph-y3value (calcFunc-index calc-graph-numsteps3 + (nth 2 calc-graph-y3value) (math-div - (math-sub (nth 3 y3value) - (nth 2 y3value)) - (1- numsteps3)))) - (if (math-realp y3value) - (setq y3value (calcFunc-index numsteps3 y3value 1)) - (error "%s is not a suitable basis for %s" y3name yname)))) - (setq xp nil - yp nil - zp nil - xvec t) - (while (setq xvalue (cdr xvalue) yvalue (cdr yvalue)) - (setq xp (nconc xp (make-list (1+ numsteps3) (car xvalue))) - yp (nconc yp (cons 0 (copy-sequence (cdr y3value)))) - zp (nconc zp (cons '(skip) - (copy-sequence (cdr (car yvalue))))))) - (setq numsteps (1- (* numsteps (1+ numsteps3))))) - (if (= (setq numsteps (1- (length yvalue))) 0) + (math-sub (nth 3 calc-graph-y3value) + (nth 2 calc-graph-y3value)) + (1- calc-graph-numsteps3)))) + (if (math-realp calc-graph-y3value) + (setq calc-graph-y3value (calcFunc-index calc-graph-numsteps3 calc-graph-y3value 1)) + (error "%s is not a suitable basis for %s" calc-graph-y3name calc-graph-yname)))) + (setq calc-graph-xp nil + calc-graph-yp nil + calc-graph-zp nil + calc-graph-xvec t) + (while (setq calc-graph-xvalue (cdr calc-graph-xvalue) calc-graph-yvalue (cdr calc-graph-yvalue)) + (setq calc-graph-xp (nconc calc-graph-xp (make-list (1+ calc-graph-numsteps3) (car calc-graph-xvalue))) + calc-graph-yp (nconc calc-graph-yp (cons 0 (copy-sequence (cdr calc-graph-y3value)))) + calc-graph-zp (nconc calc-graph-zp (cons '(skip) + (copy-sequence (cdr (car calc-graph-yvalue))))))) + (setq calc-graph-numsteps (1- (* calc-graph-numsteps + (1+ calc-graph-numsteps3))))) + (if (= (setq calc-graph-numsteps (1- (length calc-graph-yvalue))) 0) (error "Can't plot an empty vector")) - (or (and (eq (car-safe xvalue) 'vec) - (= (1- (length xvalue)) numsteps)) - (error "%s is not a suitable basis for %s" xname yname)) - (or (and (eq (car-safe y3value) 'vec) - (= (1- (length y3value)) numsteps)) - (error "%s is not a suitable basis for %s" y3name yname)) - (setq xp xvalue - yp y3value - zp yvalue - xvec t)) - (or (math-realp yvalue) + (or (and (eq (car-safe calc-graph-xvalue) 'vec) + (= (1- (length calc-graph-xvalue)) calc-graph-numsteps)) + (error "%s is not a suitable basis for %s" calc-graph-xname calc-graph-yname)) + (or (and (eq (car-safe calc-graph-y3value) 'vec) + (= (1- (length calc-graph-y3value)) calc-graph-numsteps)) + (error "%s is not a suitable basis for %s" calc-graph-y3name calc-graph-yname)) + (setq calc-graph-xp calc-graph-xvalue + calc-graph-yp calc-graph-y3value + calc-graph-zp calc-graph-yvalue + calc-graph-xvec t)) + (or (math-realp calc-graph-yvalue) (let ((arglist nil)) - (setq yvalue (math-evaluate-expr yvalue)) - (calc-default-formula-arglist yvalue) + (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue)) + (calc-default-formula-arglist calc-graph-yvalue) (setq arglist (sort arglist 'string-lessp)) (or (cdr arglist) - (error "%s does not contain enough unassigned variables" yname)) + (error "%s does not contain enough unassigned variables" calc-graph-yname)) (and (cdr (cdr arglist)) - (error "%s contains too many variables: %s" yname arglist)) - (setq yvalue (math-multi-subst yvalue + (error "%s contains too many variables: %s" calc-graph-yname arglist)) + (setq calc-graph-yvalue (math-multi-subst calc-graph-yvalue (mapcar 'math-build-var-name arglist) '((var DUMMY var-DUMMY) (var DUMMY2 var-DUMMY2)))))) - (if (setq xvec (eq (car-safe xvalue) 'vec)) - (setq numsteps (1- (length xvalue))) - (if (and (eq (car-safe xvalue) 'intv) - (math-constp xvalue)) - (setq numsteps resolution - xvalue (calcFunc-index numsteps - (nth 2 xvalue) - (math-div (math-sub (nth 3 xvalue) - (nth 2 xvalue)) - (1- numsteps)))) + (if (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 'vec)) + (setq calc-graph-numsteps (1- (length calc-graph-xvalue))) + (if (and (eq (car-safe calc-graph-xvalue) 'intv) + (math-constp calc-graph-xvalue)) + (setq calc-graph-numsteps calc-graph-resolution + calc-graph-xvalue (calcFunc-index calc-graph-numsteps + (nth 2 calc-graph-xvalue) + (math-div (math-sub (nth 3 calc-graph-xvalue) + (nth 2 calc-graph-xvalue)) + (1- calc-graph-numsteps)))) (error "%s is not a suitable basis for %s" - xname yname))) - (if (setq y3vec (eq (car-safe y3value) 'vec)) - (setq numsteps3 (1- (length y3value))) - (if (and (eq (car-safe y3value) 'intv) - (math-constp y3value)) - (setq numsteps3 resolution - y3value (calcFunc-index numsteps3 - (nth 2 y3value) - (math-div (math-sub (nth 3 y3value) - (nth 2 y3value)) - (1- numsteps3)))) + calc-graph-xname calc-graph-yname))) + (if (eq (car-safe calc-graph-y3value) 'vec) + (setq calc-graph-numsteps3 (1- (length calc-graph-y3value))) + (if (and (eq (car-safe calc-graph-y3value) 'intv) + (math-constp calc-graph-y3value)) + (setq calc-graph-numsteps3 calc-graph-resolution + calc-graph-y3value (calcFunc-index calc-graph-numsteps3 + (nth 2 calc-graph-y3value) + (math-div (math-sub (nth 3 calc-graph-y3value) + (nth 2 calc-graph-y3value)) + (1- calc-graph-numsteps3)))) (error "%s is not a suitable basis for %s" - y3name yname))) - (setq xp nil - yp nil - zp nil - xvec t) + calc-graph-y3name calc-graph-yname))) + (setq calc-graph-xp nil + calc-graph-yp nil + calc-graph-zp nil + calc-graph-xvec t) (setq math-working-step 0) - (while (setq xvalue (cdr xvalue)) - (setq xp (nconc xp (make-list (1+ numsteps3) (car xvalue))) - yp (nconc yp (cons 0 (copy-sequence (cdr y3value)))) - zp (cons '(skip) zp) - y3step y3value - var-DUMMY (car xvalue) + (while (setq calc-graph-xvalue (cdr calc-graph-xvalue)) + (setq calc-graph-xp (nconc calc-graph-xp (make-list (1+ calc-graph-numsteps3) (car calc-graph-xvalue))) + calc-graph-yp (nconc calc-graph-yp (cons 0 (copy-sequence (cdr calc-graph-y3value)))) + calc-graph-zp (cons '(skip) calc-graph-zp) + calc-graph-y3step calc-graph-y3value + var-DUMMY (car calc-graph-xvalue) math-working-step-2 0 math-working-step (1+ math-working-step)) - (while (setq y3step (cdr y3step)) + (while (setq calc-graph-y3step (cdr calc-graph-y3step)) (setq math-working-step-2 (1+ math-working-step-2) - var-DUMMY2 (car y3step) - zp (cons (math-evaluate-expr yvalue) zp)))) - (setq zp (nreverse zp) - numsteps (1- (* numsteps (1+ numsteps3)))))) + var-DUMMY2 (car calc-graph-y3step) + calc-graph-zp (cons (math-evaluate-expr calc-graph-yvalue) calc-graph-zp)))) + (setq calc-graph-zp (nreverse calc-graph-zp) + calc-graph-numsteps (1- (* calc-graph-numsteps (1+ calc-graph-numsteps3)))))) (defun calc-graph-format-data () - (while (<= (setq stepcount (1+ stepcount)) numsteps) - (if xvec - (setq xp (cdr xp) - xval (car xp) - yp (cdr yp) - yval (car yp) - zp (cdr zp) - zval (car zp)) - (if yvec - (setq xval xvalue - xvalue (math-add xvalue xstep) - yp (cdr yp) - yval (car yp)) - (setq xval (car (car yp)) - yval (cdr (car yp)) - yp (cdr yp)) - (if (or (not yp) - (and xhigh (equal xval xhigh))) - (setq numsteps 0)))) - (if is-splot - (if (and (eq (car-safe zval) 'calcFunc-xyz) - (= (length zval) 4)) - (setq xval (nth 1 zval) - yval (nth 2 zval) - zval (nth 3 zval))) - (if (and (eq (car-safe yval) 'calcFunc-xyz) - (= (length yval) 4)) + (while (<= (setq calc-graph-stepcount (1+ calc-graph-stepcount)) calc-graph-numsteps) + (if calc-graph-xvec + (setq calc-graph-xp (cdr calc-graph-xp) + calc-graph-xval (car calc-graph-xp) + calc-graph-yp (cdr calc-graph-yp) + calc-graph-yval (car calc-graph-yp) + calc-graph-zp (cdr calc-graph-zp) + calc-graph-zval (car calc-graph-zp)) + (if calc-graph-yvec + (setq calc-graph-xval calc-graph-xvalue + calc-graph-xvalue (math-add calc-graph-xvalue calc-graph-xstep) + calc-graph-yp (cdr calc-graph-yp) + calc-graph-yval (car calc-graph-yp)) + (setq calc-graph-xval (car (car calc-graph-yp)) + calc-graph-yval (cdr (car calc-graph-yp)) + calc-graph-yp (cdr calc-graph-yp)) + (if (or (not calc-graph-yp) + (and calc-graph-xhigh (equal calc-graph-xval calc-graph-xhigh))) + (setq calc-graph-numsteps 0)))) + (if calc-graph-is-splot + (if (and (eq (car-safe calc-graph-zval) 'calcFunc-xyz) + (= (length calc-graph-zval) 4)) + (setq calc-graph-xval (nth 1 calc-graph-zval) + calc-graph-yval (nth 2 calc-graph-zval) + calc-graph-zval (nth 3 calc-graph-zval))) + (if (and (eq (car-safe calc-graph-yval) 'calcFunc-xyz) + (= (length calc-graph-yval) 4)) (progn - (or surprise-splot + (or calc-graph-surprise-splot (save-excursion (set-buffer (get-buffer-create "*Gnuplot Temp*")) (save-excursion (goto-char (point-max)) (re-search-backward "^plot[ \t]") (insert "set parametric\ns") - (setq surprise-splot t)))) - (setq xval (nth 1 yval) - zval (nth 3 yval) - yval (nth 2 yval))) - (if (and (eq (car-safe yval) 'calcFunc-xy) - (= (length yval) 3)) - (setq xval (nth 1 yval) - yval (nth 2 yval))))) - (if (and (Math-realp xval) - (Math-realp yval) - (or (not zval) (Math-realp zval))) + (setq calc-graph-surprise-splot t)))) + (setq calc-graph-xval (nth 1 calc-graph-yval) + calc-graph-zval (nth 3 calc-graph-yval) + calc-graph-yval (nth 2 calc-graph-yval))) + (if (and (eq (car-safe calc-graph-yval) 'calcFunc-xy) + (= (length calc-graph-yval) 3)) + (setq calc-graph-xval (nth 1 calc-graph-yval) + calc-graph-yval (nth 2 calc-graph-yval))))) + (if (and (Math-realp calc-graph-xval) + (Math-realp calc-graph-yval) + (or (not calc-graph-zval) (Math-realp calc-graph-zval))) (progn - (setq blank nil - non-blank t) - (if (Math-integerp xval) - (insert (math-format-number xval)) - (if (eq (car xval) 'frac) - (setq xval (math-float xval))) - (insert (math-format-number (nth 1 xval)) - "e" (int-to-string (nth 2 xval)))) + (setq calc-graph-blank nil + calc-graph-non-blank t) + (if (Math-integerp calc-graph-xval) + (insert (math-format-number calc-graph-xval)) + (if (eq (car calc-graph-xval) 'frac) + (setq calc-graph-xval (math-float calc-graph-xval))) + (insert (math-format-number (nth 1 calc-graph-xval)) + "e" (int-to-string (nth 2 calc-graph-xval)))) (insert " ") - (if (Math-integerp yval) - (insert (math-format-number yval)) - (if (eq (car yval) 'frac) - (setq yval (math-float yval))) - (insert (math-format-number (nth 1 yval)) - "e" (int-to-string (nth 2 yval)))) - (if zval + (if (Math-integerp calc-graph-yval) + (insert (math-format-number calc-graph-yval)) + (if (eq (car calc-graph-yval) 'frac) + (setq calc-graph-yval (math-float calc-graph-yval))) + (insert (math-format-number (nth 1 calc-graph-yval)) + "e" (int-to-string (nth 2 calc-graph-yval)))) + (if calc-graph-zval (progn (insert " ") - (if (Math-integerp zval) - (insert (math-format-number zval)) - (if (eq (car zval) 'frac) - (setq zval (math-float zval))) - (insert (math-format-number (nth 1 zval)) - "e" (int-to-string (nth 2 zval)))))) + (if (Math-integerp calc-graph-zval) + (insert (math-format-number calc-graph-zval)) + (if (eq (car calc-graph-zval) 'frac) + (setq calc-graph-zval (math-float calc-graph-zval))) + (insert (math-format-number (nth 1 calc-graph-zval)) + "e" (int-to-string (nth 2 calc-graph-zval)))))) (insert "\n")) - (and (not (equal zval '(skip))) - (boundp 'var-PlotRejects) + (and (not (equal calc-graph-zval '(skip))) (eq (car-safe var-PlotRejects) 'vec) (nconc var-PlotRejects (list (list 'vec - curve-num - stepcount - xval yval))) + calc-graph-curve-num + calc-graph-stepcount + calc-graph-xval calc-graph-yval))) (calc-refresh-evaltos 'var-PlotRejects)) - (or blank + (or calc-graph-blank (progn (insert "\n") - (setq blank t)))))) + (setq calc-graph-blank t)))))) (defun calc-temp-file-name (num) (while (<= (length calc-graph-file-cache) (1+ num)) @@ -859,9 +898,7 @@ (setq calc-graph-file-cache (cdr calc-graph-file-cache)))) (defun calc-graph-kill-hook () - (calc-graph-delete-temps) - (if calc-graph-prev-kill-hook - (funcall calc-graph-prev-kill-hook))) + (calc-graph-delete-temps)) (defun calc-graph-show-tty (output) "Default calc-gnuplot-plot-command for \"tty\" output mode. @@ -870,6 +907,9 @@ This is useful for tek40xx and other graphics-terminal types." nil calc-gnuplot-buffer nil "-c" (format "cat %s >/dev/tty; rm %s" output output))) +(defvar calc-dumb-map nil + "The keymap for the \"dumb\" terminal plot.") + (defun calc-graph-show-dumb (&optional output) "Default calc-gnuplot-plot-command for Pinard's \"dumb\" terminal type. This \"dumb\" driver will be present in Gnuplot 3.0." @@ -882,7 +922,6 @@ This \"dumb\" driver will be present in Gnuplot 3.0." (sleep-for 1)) (goto-char (point-max)) (re-search-backward "\f\\|^[ \t]+\\^$\\|G N U P L O T") - (setq found-pt (point)) (if (looking-at "\f") (progn (forward-char 1) @@ -898,7 +937,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0." (end-of-line) (backward-char 1) (recenter '(4))) - (or (boundp 'calc-dumb-map) + (or calc-dumb-map (progn (setq calc-dumb-map (make-sparse-keymap)) (define-key calc-dumb-map "\n" 'scroll-up) @@ -1097,7 +1136,8 @@ This \"dumb\" driver will be present in Gnuplot 3.0." (or (calc-graph-find-plot nil nil) (error "No data points have been set!")) (let ((base (point)) - start) + start + end) (re-search-forward "[,\n]\\|[ \t]+with") (setq end (match-beginning 0)) (goto-char base) -- cgit v1.3