comparison lisp/progmodes/compile.el @ 47300:5128d5a8980c

(compile-internal): Add optional argument no-async.
author Colin Walters <walters@gnu.org>
date Sat, 07 Sep 2002 21:29:44 +0000
parents d4001fdfa742
children 1207b03521f9
comparison
equal deleted inserted replaced
47299:9c81bdbbbc0e 47300:5128d5a8980c
954 954
955 (defun compile-internal (command error-message 955 (defun compile-internal (command error-message
956 &optional name-of-mode parser 956 &optional name-of-mode parser
957 error-regexp-alist name-function 957 error-regexp-alist name-function
958 enter-regexp-alist leave-regexp-alist 958 enter-regexp-alist leave-regexp-alist
959 file-regexp-alist nomessage-regexp-alist) 959 file-regexp-alist nomessage-regexp-alist
960 no-async)
960 "Run compilation command COMMAND (low level interface). 961 "Run compilation command COMMAND (low level interface).
961 ERROR-MESSAGE is a string to print if the user asks to see another error 962 ERROR-MESSAGE is a string to print if the user asks to see another error
962 and there are no more errors. The rest of the arguments, 3-10 are optional. 963 and there are no more errors. The rest of the arguments, 3-10 are optional.
963 For them nil means use the default. 964 For them nil means use the default.
964 NAME-OF-MODE is the name to display as the major mode in the compilation 965 NAME-OF-MODE is the name to display as the major mode in the compilation
973 \`compilation-buffer-name-function', `compilation-enter-directory-regexp-alist', 974 \`compilation-buffer-name-function', `compilation-enter-directory-regexp-alist',
974 \`compilation-leave-directory-regexp-alist', `compilation-file-regexp-alist', 975 \`compilation-leave-directory-regexp-alist', `compilation-file-regexp-alist',
975 \ and `compilation-nomessage-regexp-alist', respectively. 976 \ and `compilation-nomessage-regexp-alist', respectively.
976 For arg 7-10 a value `t' means an empty alist. 977 For arg 7-10 a value `t' means an empty alist.
977 978
979 If NO-ASYNC is non-nil, start the compilation process synchronously.
980
978 Returns the compilation buffer created." 981 Returns the compilation buffer created."
982 (unless no-async
983 (setq no-async (not (fboundp 'start-process))))
979 (let (outbuf) 984 (let (outbuf)
980 (save-excursion 985 (save-excursion
981 (or name-of-mode 986 (or name-of-mode
982 (setq name-of-mode "Compilation")) 987 (setq name-of-mode "Compilation"))
983 (setq outbuf 988 (setq outbuf
1066 (set-window-point outwin (point-min))) 1071 (set-window-point outwin (point-min)))
1067 (compilation-set-window-height outwin) 1072 (compilation-set-window-height outwin)
1068 (if compilation-process-setup-function 1073 (if compilation-process-setup-function
1069 (funcall compilation-process-setup-function)) 1074 (funcall compilation-process-setup-function))
1070 ;; Start the compilation. 1075 ;; Start the compilation.
1071 (if (fboundp 'start-process) 1076 (if (not no-async)
1072 (let* ((process-environment 1077 (let* ((process-environment
1073 (append 1078 (append
1074 (if (and (boundp 'system-uses-terminfo) 1079 (if (and (boundp 'system-uses-terminfo)
1075 system-uses-terminfo) 1080 system-uses-terminfo)
1076 (list "TERM=dumb" "TERMCAP=" 1081 (list "TERM=dumb" "TERMCAP="