Hello Heddy,
I have made following corrections to your latest mode-compile.el
(2.28) in preparation for a sync of the XEmacs prog-modes package.
Would be great if you could accept this patch or work out any
conflicts with me so that the XEmacs package can stay maximally
synced.
Please advise,
Adrian
ChangeLog addition:
2003-06-01 Adrian Aichner <adrian(a)xemacs.org>
* mode-compile.el: Typo fixes.
* mode-compile.el (mode-compile-filename-regexp-alist): Ditto.
* mode-compile.el (mode-compile-shell-alist): Ditto.
* mode-compile.el (mode-compile-prefered-default-makerule): Removed.
* mode-compile.el (mode-compile-preferred-default-makerule): New.
Retaining compatibility via `define-obsolete-variable-alias'.
* mode-compile.el (mode-compile-choosen-compiler): Ditto.
* mode-compile.el (mode-compile-remote-execute-command): Ditto.
* mode-compile.el (mode-compile-remote-execute-misc-args): Ditto.
* mode-compile.el (python-dbg-flags): Ditto.
* mode-compile.el (mc--makerule-completion): Ditto.
* mode-compile.el (mode-compile-submit-bug-report): Ditto.
* mode-compile.el (mc--build-output-args): Double quote file
argument for Windows, where spaces are allowed in file names.
* mode-compile.el (mc--set-command): Ditto.
* mode-compile.el (mc--shell-compile): Ditto.
* mode-compile.el (makefile-compile): Ditto.
--- mode-compile.el.orig 2003-06-01 11:46:26.000000000 +0200
+++ mode-compile.el 2003-06-01 11:46:26.000000000 +0200
@@ -106,9 +106,9 @@
;;
;; When running `mode-compile' or `mode-compile-kill' the hooks
;; `mode-compile-(before|after)-(compile|kill)-hook' are executed. The
-;; current buffer could be automaticaly saved if variable
+;; current buffer could be automatically saved if variable
;; `mode-compile-always-save-buffer-p' is set to `t'. ALL the modified
-;; buffers could be automaticaly saved if variable `mode-compile-save-all-p'
+;; buffers could be automatically saved if variable `mode-compile-save-all-p'
;; is set to `t'.
;;
;; @@ fundamental-mode, text-mode, indented-text-mode & UNKNOWN MODES:
@@ -129,7 +129,7 @@
;; @@ makefile-mode:
;; The makefile is run with make throught `compile' (user is prompted
;; for the rule to run, see variable
-;; `mode-compile-prefered-default-makerule' to see how a default choice
+;; `mode-compile-preferred-default-makerule' to see how a default choice
;; could be selected).
;;
;; @@ emacs-lisp-mode, lisp-interaction-mode:
@@ -166,7 +166,7 @@
;; that case prompt to user for choice (with smart completion). Once the
;; makefile has been selected it extract the rules from it and ask to user
;; to choose a rule to make (with smart completion, see variable
-;; `mode-compile-prefered- default-makerule' to see how a default choice
+;; `mode-compile-preferred-default-makerule' to see how a default choice
;; could be selected).
;;
;; There are some cases where no makefiles are presents (YES I KNOW this is
@@ -406,7 +406,7 @@
(regexp :tag "Regexp as a string")
(symbol :tag "Variable containing the regexp")
(sexp :tag "Form wich evaluate to a string"))
- ;; I need to bind dynamicaly this with const, ideas??
+ ;; I need to bind dynamically this with const, ideas??
;;`(choice
;; ,@(mapcar (lambda (x) `(const ,(car x))) mode-compile-modes-alist))))
(function :tag "Mode to use -- should be a valid assoq in
mode-compile-modes-alist --")))
@@ -435,7 +435,7 @@
:type '(repeat
(cons :tag "Association: shell name/mode"
(string :tag "Shell name")
- ;; I need to bind dynamicaly this with const, ideas??
+ ;; I need to bind dynamically this with const, ideas??
;;`(choice
;; ,@(mapcar (lambda (x) `(const ,(car x))) mode-compile-modes-alist))))
(function :tag "Mode to use -- should be a valid assoq in
mode-compile-modes-alist --")))
@@ -489,8 +489,15 @@
(sexp :tag "Form evaluating to a string"))
:group 'compilation)
+;; XEmacs change: backwards compatibility.
+;; APA: Make sure variable typo fix does not cause breakage!
+;; Keep this before the associated defcustom.
+(define-obsolete-variable-alias
+ 'mode-compile-prefered-default-makerule
+ 'mode-compile-preferred-default-makerule)
+
;;;###autoload
-(defcustom mode-compile-prefered-default-makerule 'none
+(defcustom mode-compile-preferred-default-makerule 'none
"*Default makerule you would like to see in minibuffer as a default choice
when selecting the make rule to build.
@@ -637,7 +644,7 @@
Could be used in combination with
(cc|c++|ada|f77)-default-compiler-options
-to automaticaly choose the compiler specific options.
+to automatically choose the compiler specific options.
example:
(defun my-compiler-get-options()
@@ -703,7 +710,7 @@
"The shell command used to run a command remotely.
\"rsh\" is the only choice I know but I'm far to know everything...
- This variable is set automaticaly with the value of
+ This variable is set automatically with the value of
remote-shell-program or efs-remote-shell-file-name at load time."
:type 'string
:group 'compilation)
@@ -743,7 +750,7 @@
:group 'compilation-remote)
(defcustom mode-compile-remote-execute-misc-args ""
- "Misc additionnals arguments to give to the
+ "Misc additional arguments to give to the
mode-compile-remote-execute-command."
:type 'string
:group 'compilation-remote)
@@ -1250,7 +1257,7 @@
(defcustom python-dbg-flags ""
"*Flags to give to python -- none."
:type 'string
-:group 'compile-phthon)
+:group 'compile-python)
(defvar python-compilation-error-regexp-alist
;; TK (file "/directory-path/filename.tcl" line XY in ZZZ)
@@ -1720,7 +1727,7 @@
" -c "
;; outfile will be an executable file
" ")
- infile " -o " out-file )))
+ "\"" infile "\" -o \"" out-file
"\"")))
(defun mc--set-remote-cmd (remote-host &optional username pathname)
;; Check validity of remote-host or ask one to user
@@ -1839,11 +1846,11 @@
(append mc--makefile-rules '([])))
(defun mc--makerule-completion (alist outfile &optional pref)
- ;; Return the makerule completion according to the prefered
+ ;; Return the makerule completion according to the preferred
;; default makerule
(let ((preference (or pref
- mode-compile-prefered-default-makerule)))
- (mc--msg "Prefered makerule choice is '%s" preference)
+ mode-compile-preferred-default-makerule)))
+ (mc--msg "Preferred makerule choice is '%s" preference)
(cond
((eq preference 'none)
;; Just show max common completion string to user
@@ -1855,7 +1862,7 @@
(mc--makerule-completion alist outfile 'none)))
((eq preference 'file)
- ;; The out file is prefered or 'none
+ ;; The out file is preferred or 'none
(or outfile (mc--makerule-completion alist outfile 'none)))
((eq preference 'default)
@@ -1864,8 +1871,8 @@
(t
;; Invalid preference return 'none
- (mc--msg "Invalid `mode-compile-prefered-default-makerule': '%s"
- mode-compile-prefered-default-makerule)
+ (mc--msg "Invalid `mode-compile-preferred-default-makerule':
'%s"
+ mode-compile-preferred-default-makerule)
(mc--makerule-completion alist outfile 'none)))))
(defun mc--choose-makefile-rule (makefile &optional outfile)
@@ -1971,7 +1978,7 @@
;; build make command by asking rule to user
(concat mode-compile-make-program " "
(or (mc--eval mode-compile-make-options) "")
- " -f " mc--selected-makefile " "
+ " -f \"" mc--selected-makefile "\" "
(mc--choose-makefile-rule
mc--selected-makefile out-fname))))
;; else
@@ -2009,7 +2016,7 @@
(shfile (or mc--remote-pathname (buffer-file-name)
(error "Compilation abort: Buffer %s has no filename"
(buffer-name))))
- (run-cmd (concat shcmd " " dbgflags " " shfile "
"
+ (run-cmd (concat shcmd " " dbgflags " \"" shfile
"\" "
(setq mc--shell-args
(read-string (if mode-compile-expert-p
"Argv: "
@@ -2278,7 +2285,7 @@
(setq mc--compile-command
(concat mode-compile-make-program " "
(or (mc--eval mode-compile-make-options) "")
- " -f " mkfile " "
+ " -f \"" mkfile "\" "
(mc--choose-makefile-rule mkfile))))
(mc--compile mc--compile-command))
@@ -2461,7 +2468,7 @@
'mode-compile-other-frame-p
'mode-compile-other-frame-name
'mode-compile-frame-parameters-alist
- 'mode-compile-prefered-default-makerule
+ 'mode-compile-preferred-default-makerule
'emacs-lisp-byte-compile-dir-interactive-p
;; others variables
'features
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/