From 0255a70c8ae22e259e8938ac3840c7b6687edec8 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 28 Apr 2016 02:00:23 +0300 Subject: Don't mistake `for' inside a function for a part of array comprehension * lisp/progmodes/js.el (js--indent-in-array-comp): Also check the depth in parens between the bracket and `for' (bug#23391). * test/indent/js.js: Add a corresponding example. --- lisp/progmodes/js.el | 6 ++++-- test/indent/js.js | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 8c93ffa873..48eb3e778e 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1892,9 +1892,11 @@ In particular, return the buffer position of the first `for' kwd." ;; To skip arbitrary expressions we need the parser, ;; so we'll just guess at it. (if (and (> end (point)) ; Not empty literal. - (re-search-forward "[^,]]* \\(for\\) " end t) + (re-search-forward "[^,]]* \\(for\\_>\\)" end t) ;; Not inside comment or string literal. - (not (nth 8 (parse-partial-sexp bracket (point))))) + (let ((status (parse-partial-sexp bracket (point)))) + (and (= 1 (car status)) + (not (nth 8 status))))) (match-beginning 1))))))) (defun js--array-comp-indentation (bracket for-kwd) diff --git a/test/indent/js.js b/test/indent/js.js index 61c7b440ea..23fae17b3c 100644 --- a/test/indent/js.js +++ b/test/indent/js.js @@ -53,6 +53,14 @@ var p = { var evens = [e for each (e in range(0, 21)) if (ed % 2 == 0)]; +var funs = [ + function() { + for (;;) { + } + }, + function(){}, +]; + !b !=b !==b -- cgit v1.2.3 From 734fb3ac6c3e5708ed05b6c5b1d8af92838ee3f5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 27 Apr 2016 15:52:53 -0700 Subject: Port dumping to NetBSD with PaX Problem reported by Thomas Klausner (Bug#23371). * configure.ac (PAXCTL_dumped, PAXCTL_notdumped): New vars. Set them to setfattr and/or paxctl commands appropriate for GNU/Linux and/or NetBSD; the latter prefers paxctl +a. Search for paxctl only if setfattr is not found. * src/Makefile.in (PAXCTL_dumped, PAXCTL_notdumped): New vars, replacing PAXCTL_if_present and SETFATTR_if_present. All uses changed. --- configure.ac | 38 +++++++++++++++++++++++++++++--------- src/Makefile.in | 18 ++++++++++++------ 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 4f169b67dc..8f8c38bd83 100644 --- a/configure.ac +++ b/configure.ac @@ -1140,16 +1140,9 @@ AC_PATH_PROG(GZIP_PROG, gzip) test $with_compress_install != yes && test -n "$GZIP_PROG" && \ GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" +PAXCTL_dumped= +PAXCTL_notdumped= if test $opsys = gnu-linux; then - AC_PATH_PROG(PAXCTL, paxctl,, - [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) - if test "X$PAXCTL" != X; then - AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes) - else AC_MSG_RESULT(no); PAXCTL=""; fi]) - fi - if test "${SETFATTR+set}" != set; then AC_CACHE_CHECK([for setfattr], [emacs_cv_prog_setfattr], @@ -1160,6 +1153,7 @@ if test $opsys = gnu-linux; then emacs_cv_prog_setfattr=no fi]) if test "$emacs_cv_prog_setfattr" = yes; then + PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er' SETFATTR=setfattr else SETFATTR= @@ -1168,6 +1162,32 @@ if test $opsys = gnu-linux; then AC_SUBST([SETFATTR]) fi fi +case $opsys,$PAXCTL_notdumped in + gnu-linux, | netbsd,) + AC_PATH_PROG([PAXCTL], [paxctl], [], + [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) + if test -n "$PAXCTL"; then + if test "$opsys" = netbsd; then + PAXCTL_dumped='$(PAXCTL) +a' + PAXCTL_notdumped=$PAXCTL_dumped + else + AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PAXCTL= + fi]) + if test -n "$PAXCTL"; then + PAXCTL_dumped='$(PAXCTL) -zex' + PAXCTL_notdumped='$(PAXCTL) -r' + fi + fi + fi;; +esac +AC_SUBST([PAXCTL_dumped]) +AC_SUBST([PAXCTL_notdumped]) ## Need makeinfo >= 4.7 (?) to build the manuals. if test "$MAKEINFO" != "no"; then diff --git a/src/Makefile.in b/src/Makefile.in index 1f0df6f3ec..d54670932d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -114,8 +114,9 @@ TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) ## around this, newer ones setfattr. See Bug#11398 and Bug#16343. PAXCTL = @PAXCTL@ SETFATTR = @SETFATTR@ -PAXCTL_if_present = $(or $(PAXCTL),: paxctl) -SETFATTR_if_present = $(or $(SETFATTR),: setfattr) +## Commands to set PaX flags on dumped and not-dumped instances of Emacs. +PAXCTL_dumped = @PAXCTL_dumped@ +PAXCTL_notdumped = @PAXCTL_notdumped@ ## Some systems define this to request special libraries. LIBS_SYSTEM=@LIBS_SYSTEM@ @@ -532,7 +533,9 @@ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump - $(PAXCTL_if_present) -zex $@ + ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) $@ + endif ln -f $@ bootstrap-emacs$(EXEEXT) endif @@ -594,8 +597,9 @@ temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \ -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES) $(MKDIR_P) $(etc) ifneq ($(CANNOT_DUMP),yes) - $(PAXCTL_if_present) -r $@ - $(SETFATTR_if_present) -n user.pax.flags -v er $@ + ifneq ($(PAXCTL_notdumped),) + $(PAXCTL_notdumped) $@ + endif endif ## The following oldxmenu-related rules are only (possibly) used if @@ -734,7 +738,9 @@ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else $(RUN_TEMACS) --batch --load loadup bootstrap - $(PAXCTL_if_present) -zex emacs$(EXEEXT) + ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) emacs$(EXEEXT) + endif mv -f emacs$(EXEEXT) $@ endif @: Compile some files earlier to speed up further compilation. -- cgit v1.2.3 From 5c3534ffdcce41b1aab7bd158cf07224446caa9d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 27 Apr 2016 19:21:41 -0400 Subject: * lisp/window.el (window--process-window-list): No-op if no processes. This avoids an issue with save-selected-window (from walk-windows) failing if frame.el is not loaded, eg if the terminal is resized during startup of a -nw CANNOT_DUMP build. (Bug#23369). --- lisp/window.el | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/lisp/window.el b/lisp/window.el index 0d7dbd844e..d9ac0e6d24 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8520,24 +8520,25 @@ A window is associated with a process if that window is displaying that processes's buffer." (let ((processes (process-list)) (process-windows nil)) - (walk-windows - (lambda (window) - (let ((buffer (window-buffer window)) - (iter processes)) - (while (let ((process (car iter))) - (if (and (process-live-p process) - (eq buffer (process-buffer process))) - (let ((procwin (assq process process-windows))) - ;; Add this window to the list of windows - ;; displaying process. - (if procwin - (push window (cdr procwin)) - (push (list process window) process-windows)) - ;; We found our process for this window, so - ;; stop iterating over the process list. - nil) - (setf iter (cdr iter))))))) - 1 t) + (if processes + (walk-windows + (lambda (window) + (let ((buffer (window-buffer window)) + (iter processes)) + (while (let ((process (car iter))) + (if (and (process-live-p process) + (eq buffer (process-buffer process))) + (let ((procwin (assq process process-windows))) + ;; Add this window to the list of windows + ;; displaying process. + (if procwin + (push window (cdr procwin)) + (push (list process window) process-windows)) + ;; We found our process for this window, so + ;; stop iterating over the process list. + nil) + (setf iter (cdr iter))))))) + 1 t)) process-windows)) (defun window--adjust-process-windows () -- cgit v1.2.3 From 48b24c9b031ba593426d4e9980b360c273f57166 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 29 Apr 2016 13:35:01 +0000 Subject: Correct indentation of ids in a C++ enum after a protection keyword. Also correct the misfontification of the last enum identifier. * lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id): setq c-last-identifier-range to nil to ensure that only types recognized by this macro are set for fontification as types. (c-backward-typed-enum-colon): Function renamed from c-backward-colon-prefixed-type. On finding a colon in the backward search, check it is preceded by an identifier rather than a keyword. --- lisp/progmodes/cc-engine.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 62bc236706..b2fe9b27e3 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -5806,6 +5806,7 @@ comment at the start of cc-engine.el for more info." ;; ;; This macro might do hidden buffer changes. `(let (res) + (setq c-last-identifier-range nil) (while (if (setq res ,(if (eq type 'type) `(c-forward-type) `(c-forward-name))) @@ -8928,11 +8929,11 @@ comment at the start of cc-engine.el for more info." (not (looking-at "="))))) b-pos))) -(defun c-backward-colon-prefixed-type () - ;; We're at the token after what might be a type prefixed with a colon. Try - ;; moving backward over this type and the colon. On success, return t and - ;; leave point before colon; on failure, leave point unchanged. Will clobber - ;; match data. +(defun c-backward-typed-enum-colon () + ;; We're at a "{" which might be the opening brace of a enum which is + ;; strongly typed (by a ":" followed by a type). If this is the case, leave + ;; point before the colon and return t. Otherwise leave point unchanged and return nil. + ;; Match data will be clobbered. (let ((here (point)) (colon-pos nil)) (save-excursion @@ -8941,7 +8942,10 @@ comment at the start of cc-engine.el for more info." (or (not (looking-at "\\s)")) (c-go-up-list-backward)) (cond - ((eql (char-after) ?:) + ((and (eql (char-after) ?:) + (save-excursion + (c-backward-syntactic-ws) + (c-on-identifier))) (setq colon-pos (point)) (forward-char) (c-forward-syntactic-ws) @@ -8965,7 +8969,7 @@ comment at the start of cc-engine.el for more info." (let ((here (point)) up-sexp-pos before-identifier) (when c-recognize-post-brace-list-type-p - (c-backward-colon-prefixed-type)) + (c-backward-typed-enum-colon)) (while (and (eq (c-backward-token-2) 0) -- cgit v1.2.3 From b671e218db4bed019edd80abf72f77f9b5a07f0d Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 29 Apr 2016 14:36:33 +0000 Subject: Revert unneeded change which harms syntactic parsing. This fixes bug #23308. * lisp/progmodes/cc-engine.el (c-invalidate-state-cache): User c-state-old-cpp-end as an argument to c-with-all-but-one-cpps-commented-out regardless of the value of `here'. --- lisp/progmodes/cc-engine.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index b2fe9b27e3..2010515ce5 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -3411,7 +3411,7 @@ comment at the start of cc-engine.el for more info." (< c-state-old-cpp-beg here)) (c-with-all-but-one-cpps-commented-out c-state-old-cpp-beg - (min c-state-old-cpp-end here) + c-state-old-cpp-end (c-invalidate-state-cache-1 here)) (c-with-cpps-commented-out (c-invalidate-state-cache-1 here)))) -- cgit v1.2.3 From c6077bfd297a8a0e4deaec217db17be630d98b9c Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 29 Apr 2016 14:58:21 +0000 Subject: Restore follow-scroll-up/down to scrolling by the combined size of all windows Also rename the current follow-scroll-up/down functions to follow-scroll-up-window and follow-scroll-down-window. These scroll by the height of the current window. This fixes bug #23347. * lisp/follow.el (follow-mode): Tweak the doc string. (follow-scroll-up-arg, follow-scroll-down-arg): new functions, extracted from follow-scroll-up/down. (follow-scroll-up-window, follow-scroll-down-window): Functions renamed from follow-scroll-up/down. (follow-scroll-up, follow-scroll-down): Restore the historic functionality. --- lisp/follow.el | 138 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 107 insertions(+), 31 deletions(-) diff --git a/lisp/follow.el b/lisp/follow.el index 5801f79341..c510e5a848 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -399,11 +399,11 @@ virtual window. This is accomplished by two main techniques: makes it possible to walk between windows using normal cursor movement commands. -Follow mode comes to its prime when used on a large screen and two -side-by-side windows are used. The user can, with the help of Follow -mode, use two full-height windows as though they would have been -one. Imagine yourself editing a large function, or section of text, -and being able to use 144 lines instead of the normal 72... (your +Follow mode comes to its prime when used on a large screen and two or +more side-by-side windows are used. The user can, with the help of +Follow mode, use these full-height windows as though they were one. +Imagine yourself editing a large function, or section of text, and +being able to use 144 or 216 lines instead of the normal 72... (your mileage may vary). To split one large window into two side-by-side windows, the commands @@ -532,6 +532,80 @@ Return the new position." ;; position... (This would also be corrected if we would have had a ;; good redisplay abstraction.) +(defun follow-scroll-up-arg (arg) + "Scroll the text in a follow mode window chain up by ARG lines. +If ARG is nil, scroll the size of the current window. + +This is an internal function for `follow-scroll-up' and +`follow-scroll-up-window'." + (let ((opoint (point)) (owin (selected-window))) + (while + ;; If we are too near EOB, try scrolling the previous window. + (condition-case nil (progn (scroll-up arg) nil) + (end-of-buffer + (condition-case nil (progn (follow-previous-window) t) + (error + (select-window owin) + (goto-char opoint) + (signal 'end-of-buffer nil)))))) + (unless (and scroll-preserve-screen-position + (get this-command 'scroll-command)) + (goto-char opoint)) + (setq follow-fixed-window t))) + +(defun follow-scroll-down-arg (arg) + "Scroll the text in a follow mode window chain down by ARG lines. +If ARG is nil, scroll the size of the current window. + +This is an internal function for `follow-scroll-down' and +`follow-scroll-down-window'." + (let ((opoint (point))) + (scroll-down arg) + (unless (and scroll-preserve-screen-position + (get this-command 'scroll-command)) + (goto-char opoint)) + (setq follow-fixed-window t))) + +;;;###autoload +(defun follow-scroll-up-window (&optional arg) + "Scroll text in a Follow mode window up by that window's size. +The other windows in the window chain will scroll synchronously. + +If called with no ARG, the `next-screen-context-lines' last lines of +the window will be visible after the scroll. + +If called with an argument, scroll ARG lines up. +Negative ARG means scroll downward. + +Works like `scroll-up' when not in Follow mode." + (interactive "P") + (cond ((not follow-mode) + (scroll-up arg)) + ((eq arg '-) + (follow-scroll-down-window)) + (t (follow-scroll-up-arg arg)))) +(put 'follow-scroll-up-window 'scroll-command t) + +;;;###autoload +(defun follow-scroll-down-window (&optional arg) + "Scroll text in a Follow mode window down by that window's size. +The other windows in the window chain will scroll synchronously. + +If called with no ARG, the `next-screen-context-lines' top lines of +the window in the chain will be visible after the scroll. + +If called with an argument, scroll ARG lines down. +Negative ARG means scroll upward. + +Works like `scroll-down' when not in Follow mode." + (interactive "P") + (cond ((not follow-mode) + (scroll-down arg)) + ((eq arg '-) + (follow-scroll-up-window)) + (t (follow-scroll-down-arg arg)))) +(put 'follow-scroll-down-window 'scroll-command t) + ;;;###autoload (defun follow-scroll-up (&optional arg) "Scroll text in a Follow mode window chain up. @@ -546,23 +620,18 @@ Works like `scroll-up' when not in Follow mode." (interactive "P") (cond ((not follow-mode) (scroll-up arg)) - ((eq arg '-) - (follow-scroll-down)) - (t - (let ((opoint (point)) (owin (selected-window))) - (while - ;; If we are too near EOB, try scrolling the previous window. - (condition-case nil (progn (scroll-up arg) nil) - (end-of-buffer - (condition-case nil (progn (follow-previous-window) t) - (error - (select-window owin) - (goto-char opoint) - (signal 'end-of-buffer nil)))))) - (unless (and scroll-preserve-screen-position - (get this-command 'scroll-command)) - (goto-char opoint)) - (setq follow-fixed-window t))))) + (arg (follow-scroll-up-arg arg)) + (t + (let* ((windows (follow-all-followers)) + (end (window-end (car (reverse windows))))) + (if (eq end (point-max)) + (signal 'end-of-buffer nil) + (select-window (car windows)) + ;; `window-end' might return nil. + (if end + (goto-char end)) + (vertical-motion (- next-screen-context-lines)) + (set-window-start (car windows) (point))))))) (put 'follow-scroll-up 'scroll-command t) ;;;###autoload @@ -579,15 +648,22 @@ Works like `scroll-down' when not in Follow mode." (interactive "P") (cond ((not follow-mode) (scroll-down arg)) - ((eq arg '-) - (follow-scroll-up)) - (t - (let ((opoint (point))) - (scroll-down arg) - (unless (and scroll-preserve-screen-position - (get this-command 'scroll-command)) - (goto-char opoint)) - (setq follow-fixed-window t))))) + (arg (follow-scroll-down-arg arg)) + (t + (let* ((windows (follow-all-followers)) + (win (car (reverse windows))) + (start (window-start (car windows)))) + (if (eq start (point-min)) + (signal 'beginning-of-buffer nil) + (select-window win) + (goto-char start) + (vertical-motion (- (- (window-height win) + (if header-line-format 2 1) + next-screen-context-lines))) + (set-window-start win (point)) + (goto-char start) + (vertical-motion (- next-screen-context-lines 1)) + (setq follow-internal-force-redisplay t)))))) (put 'follow-scroll-down 'scroll-command t) (declare-function comint-adjust-point "comint" (window)) -- cgit v1.2.3 From 1c58fa1d09686b1c1ea676c7be46055722608e6c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Apr 2016 12:56:03 +0300 Subject: Fix variable-pitch font on MS-Windows * lisp/faces.el (variable-pitch) [w32]: Name a variable-pitch font explicitly, to avoid Emacs picking up a bold-italic variant on some MS-Windows systems. See this thread for details: http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00746.html. --- lisp/faces.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/faces.el b/lisp/faces.el index 612bd1677b..5f3020b318 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2281,7 +2281,11 @@ If you set `term-file-prefix' to nil, this function does nothing." :group 'basic-faces) (defface variable-pitch - '((t :family "Sans Serif")) + '((((type w32)) + ;; This is a kludgey workaround for an issue discussed in + ;; http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00746.html. + :font "-outline-Arial-normal-normal-normal-sans-*-*-*-*-p-*-iso8859-1") + (t :family "Sans Serif")) "The basic variable-pitch face." :group 'basic-faces) -- cgit v1.2.3 From ffe701cb07cfb3584c4e4894976f0c9487d02c59 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 30 Apr 2016 12:16:55 +0200 Subject: Remove \= from format string (bug#18190) * lisp/emacs-lisp/eieio.el (defclass): Remove \= from format string. --- lisp/emacs-lisp/eieio.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 772ebd900d..51a6f7bc20 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -235,7 +235,7 @@ This method is obsolete." (let ((f (intern (format "%s-child-p" name)))) `((defalias ',f ',testsym2) (make-obsolete - ',f ,(format "use (cl-typep ... \\='%s) instead" name) + ',f ,(format "use (cl-typep ... '%s) instead" name) "25.1")))) ;; When using typep, (typep OBJ 'myclass) returns t for objects which -- cgit v1.2.3 From ccdaf04cfdaa42fb85d456274405cce32ee9f5d4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Apr 2016 13:45:33 +0300 Subject: Fix the MSDOS build * config.bat: * msdos/sedlisp.inp: * msdos/sedlibmk.inp: * msdos/sedleim.inp: * msdos/sedadmin.inp: * msdos/sed6.inp: * msdos/sed3v2.inp: * msdos/sed2v2.inp: * msdos/sed1v2.inp: Adapt to Emacs 25. * src/process.c (remove_slash_colon): Move out of "#ifdef subprocesses" block, as it its called unconditionally. Move ADD_SUBFEATURE calls into "#ifdef subprocesses" block, as they reference variables only defined in that block. * src/msdos.h: Provide prototypes for IT_set_frame_parameters, faccessat, msdos_fatal_signal, syms_of_msdos, pthread_sigmask, dos_keysns, dos_keyread, run_msdos_command, and syms_of_win16select, to avoid compiler warnings. * src/msdos.c (SYS_ENVIRON): Define to either '_environ' or 'environ', depending on the DJGPP version. Remove declarations of externally-visible Lisp objects, like Qbackground_color and Qreverse. (run_msdos_command): First argument is not signed, not unsigned. Use SYS_ENVIRON. (sys_select): Use 'timespec_cmp' instead of 'timespec_sign', as the latter doesn't work when 'time_t' is an unsigned data type. This caused idle timers to behave incorrectly: they only fired after a keyboard input event. * src/frame.c (adjust_frame_size) [MSDOS]: Account for FRAME_TOP_MARGIN that isn't counted in the frame's number of lines, but dos_set_window_size needs it to be added. * src/lread.c (INFINITY, NAN) [DJGPP < 2.05]: Provide definitions. * src/fns.c (sort_vector_copy) [__GNUC__ < 4]: Provide a prototype that works around compilation errors with older GCC versions. * src/w16select.c: Don't declare QCLIPBOARD and QPRIMARY as Lisp Objects. * src/filelock.c [MSDOS]: Ifdef away most of the code. Provide no-op implementations for 'lock_file' and 'unlock_file'. (Ffile_locked_p) [MSDOS]: Always return nil. This avoids multiple ifdefs in all users of filelock.c functionality. * src/conf_post.h (EOVERFLOW, SIZE_MAX) [DJGPP < 2.04]: Define. * src/emacs.c [MSDOS]: Include dosfns.h, to avoid compiler warnings. * src/dosfns.h: Provide prototypes for dos_cleanup, syms_of_dosfns, and init_dosfns. * src/deps.mk (atimer.o): Depend on msdos.h. (emacs.o): Depend on dosfns.h. * src/atimer.c [MSDOS]: Include msdos.h, to avoid compiler warnings. * lisp/window.el (window--adjust-process-windows): Skip the body if 'process-list' is not available. This avoids failure to start up on MS-DOS. * lisp/vc/diff.el (diff-no-select): Test 'make-process', not 'start-process', as the latter is now available on all platforms. * lisp/textmodes/ispell.el (ispell-async-processp): Replace 'start-process' with 'make-process' in a comment. * lisp/term/internal.el (IT-unicode-translations): Modify and add a few translations to display Info files with Unicode markup. Fix an ancient off-by-one mismatch error with Unicode codepoints. * lisp/progmodes/compile.el (compilation-start): Test 'make-process', not 'start-process', as the latter is now available on all platforms. * lisp/man.el (Man-build-man-command, Man-getpage-in-background): Test 'make-process', not 'start-process', as the latter is now available on all platforms. * lisp/international/mule-cmds.el (set-coding-system-map): Test 'make-process', not 'start-process', as the latter is now available on all platforms. * lisp/eshell/esh-cmd.el (eshell-do-pipelines-synchronously): Doc fix. (eshell-execute-pipeline): Test 'make-process', not 'start-process', as the latter is now available on all platforms. --- config.bat | 27 +++++++-- lisp/eshell/esh-cmd.el | 4 +- lisp/international/mule-cmds.el | 2 +- lisp/man.el | 4 +- lisp/progmodes/compile.el | 2 +- lisp/term/internal.el | 30 +++++----- lisp/textmodes/ispell.el | 2 +- lisp/vc/diff.el | 2 +- lisp/window.el | 21 +++---- msdos/sed1v2.inp | 119 +++++++++++++++++++++------------------- msdos/sed2v2.inp | 7 ++- msdos/sed3v2.inp | 13 ++--- msdos/sed6.inp | 28 +++------- msdos/sedadmin.inp | 14 ++--- msdos/sedleim.inp | 10 +++- msdos/sedlibmk.inp | 34 +++++------- msdos/sedlisp.inp | 4 ++ src/atimer.c | 4 ++ src/conf_post.h | 3 + src/deps.mk | 4 +- src/dosfns.h | 4 ++ src/emacs.c | 1 + src/filelock.c | 19 +++++++ src/fns.c | 5 ++ src/frame.c | 11 ++-- src/lread.c | 4 ++ src/msdos.c | 36 ++++++------ src/msdos.h | 14 +++++ src/process.c | 39 +++++++------ src/w16select.c | 5 +- 30 files changed, 272 insertions(+), 200 deletions(-) diff --git a/config.bat b/config.bat index 04fce0f298..a5bea7135a 100644 --- a/config.bat +++ b/config.bat @@ -174,7 +174,7 @@ junk If ErrorLevel 1 Goto xmlDone Echo Configuring with libxml2 ... sed -e "/#undef HAVE_LIBXML2/s/^.*$/#define HAVE_LIBXML2 1/" config.h3 -mv config.h3 config.h2 +sed -e "/#define EMACS_CONFIG_FEATURES/s/^.*$/#define EMACS_CONFIG_FEATURES \"LIBXML2\"/" config.h2 set libxml=1 :xmlDone rm -f junk.c junk junk.exe @@ -194,7 +194,7 @@ if exist dir.h ren dir.h vmsdir.h rem Create "makefile" from "makefile.in". rm -f Makefile makefile.tmp -copy Makefile.in+lisp.mk+deps.mk makefile.tmp +copy Makefile.in+deps.mk makefile.tmp sed -f ../msdos/sed1v2.inp Makefile rm -f makefile.tmp @@ -227,6 +227,10 @@ rem ---------------------------------------------------------------------- Echo Configuring the library source directory... cd lib-src sed -f ../msdos/sed3v2.inp Makefile +mv Makefile makefile.tmp +sed -n -e "/^AC_INIT/s/[^,]*, \([^,]*\).*/@set emver=\1/p" ../configure.ac > emver.bat +call emver.bat +sed -e "s/@version@/%emver%/g" Makefile if "%X11%" == "" goto libsrc2a mv Makefile makefile.tmp sed -f ../msdos/sed3x.inp Makefile @@ -252,16 +256,23 @@ cd .. rem ---------------------------------------------------------------------- Echo Configuring the doc directory, expect one "File not found" message... cd doc +Rem Rename files like djtar on plain DOS filesystem would. +If Exist emacs\emacsver.texi.in update emacs/emacsver.texi.in emacs/emacsver.in +If Exist man\emacs.1.in update man/emacs.1.in man/emacs.in +If Exist ..\etc\refcards\emacsver.tex.in update ../etc/refcards/emacsver.tex.in ../etc/refcards/emacsver.in Rem The two variants for lispintro below is for when the shell Rem supports long file names but DJGPP does not -for %%d in (emacs lispref lispintro lispintr misc) do sed -f ../msdos/sed6.inp < %%d\Makefile.in > %%d\Makefile +for %%d in (emacs lispref lispintro lispintr misc) do sed -e "s/@version@/%emver%/g" -f ../msdos/sed6.inp < %%d\Makefile.in > %%d\Makefile +Rem produce emacs.1 from emacs.in +If Exist man\emacs.1 goto manOk +sed -e "s/@version@/%emver%/g" -e "s/@PACKAGE_BUGREPORT@/bug-gnu-emacs@gnu.org/g" < man\emacs.in > man\emacs.1 +:manOk cd .. rem ---------------------------------------------------------------------- Echo Configuring the lib directory... If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h cd lib Rem Rename files like djtar on plain DOS filesystem would. -If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h If Exist alloca.in.h update alloca.in.h alloca.in-h If Exist byteswap.in.h update byteswap.in.h byteswap.in-h If Exist dirent.in.h update dirent.in.h dirent.in-h @@ -286,6 +297,7 @@ If Exist sys_types.in.h update sys_types.in.h sys_types.in-h If Exist sys_time.in.h update sys_time.in.h sys_time.in-h If Exist time.in.h update time.in.h time.in-h If Exist unistd.in.h update unistd.in.h unistd.in-h +Rem Only repository has the msdos/autogen directory If Exist Makefile.in sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp If Exist ..\msdos\autogen\Makefile.in sed -f ../msdos/sedlibcf.inp < ..\msdos\autogen\Makefile.in > makefile.tmp sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile @@ -311,6 +323,12 @@ If Not Exist admin\unidata goto noadmin Echo Configuring the admin/unidata directory... cd admin\unidata sed -f ../../msdos/sedadmin.inp < Makefile.in > Makefile +Echo Configuring the admin/charsets directory... +cd ..\charsets +sed -f ../../msdos/sedadmin.inp < Makefile.in > Makefile +Echo Configuring the admin/grammars directory... +cd ..\grammars +sed -f ../../msdos/sedadmin.inp < Makefile.in > Makefile cd ..\.. :noadmin rem ---------------------------------------------------------------------- @@ -345,3 +363,4 @@ set nodebug= set djgpp_ver= set sys_malloc= set libxml= +set emver= diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 60615131e2..d3613d3140 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -800,7 +800,7 @@ This macro calls itself recursively, with NOTFIRST non-nil." (defmacro eshell-do-pipelines-synchronously (pipeline) "Execute the commands in PIPELINE in sequence synchronously. Output of each command is passed as input to the next one in the pipeline. -This is used on systems where `start-process' is not supported." +This is used on systems where async subprocesses are not supported." (when (setq pipeline (cadr pipeline)) `(progn ,(when (cdr pipeline) @@ -838,7 +838,7 @@ This is used on systems where `start-process' is not supported." "Execute the commands in PIPELINE, connecting each to one another." `(let ((eshell-in-pipeline-p t) tailproc) (progn - ,(if (fboundp 'start-process) + ,(if (fboundp 'make-process) `(eshell-do-pipelines ,pipeline) `(let ((tail-handles (eshell-create-handles (car (aref eshell-current-handles diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index dbf12247fc..001aad1475 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -72,7 +72,7 @@ (let ((map (make-sparse-keymap "Set Coding System"))) (bindings--define-key map [set-buffer-process-coding-system] '(menu-item "For I/O with Subprocess" set-buffer-process-coding-system - :visible (fboundp 'start-process) + :visible (fboundp 'make-process) :enable (get-buffer-process (current-buffer)) :help "How to en/decode I/O from/to subprocess connected to this buffer")) (bindings--define-key map [set-next-selection-coding-system] diff --git a/lisp/man.el b/lisp/man.el index b483dd12e8..2b2ee99a9b 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -619,7 +619,7 @@ This is necessary if one wants to dump man.el with Emacs." ;; `call-process' below sends it to /dev/null, ;; so we don't need `2>' even with DOS shells ;; which do support stderr redirection. - ((not (fboundp 'start-process)) " %s") + ((not (fboundp 'make-process)) " %s") ((concat " %s 2>" null-device))))) (flist Man-filter-list)) (while (and flist (car flist)) @@ -1080,7 +1080,7 @@ Return the buffer in which the manpage will appear." "[cleaning...]") 'face 'mode-line-emphasis))) (Man-start-calling - (if (fboundp 'start-process) + (if (fboundp 'make-process) (let ((proc (start-process manual-program buffer (if (memq system-type '(cygwin windows-nt)) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index b7ab408f74..dbda8a9d5b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1736,7 +1736,7 @@ Returns the compilation buffer created." (funcall compilation-process-setup-function)) (and outwin (compilation-set-window-height outwin)) ;; Start the compilation. - (if (fboundp 'start-process) + (if (fboundp 'make-process) (let ((proc (if (eq mode t) ;; comint uses `start-file-process'. diff --git a/lisp/term/internal.el b/lisp/term/internal.el index f026c66b2a..6f4866b079 100644 --- a/lisp/term/internal.el +++ b/lisp/term/internal.el @@ -233,13 +233,13 @@ "U*!" "U*'" "R*;" "!:" ":'" "!*" nil nil nil "w*j" nil nil "w*?" nil "O*!" "O*'" "W*!" "W*'" "W*J" "/*" ";;" nil nil nil "1N" "1M" "3M" "4M" "6M" nil ; Gen Punct - nil "1T" "1H" nil nil nil "LRM" "RLM" "-1" nil - nil "--" "---" "===" "!2" "=2" "6`" "'9" ".9" "9'" - "``" "''" ":9" "9``" "/-" "/=" "sb" "3b" nil ".." + nil "1T" "1H" nil nil nil "LRM" "RLM" "-" "-" + "-" "--" "---" "===" "!2" "=2" "'" "'" ".9" "9'" + "\"" "\"" ":9" "9``" "/-" "/=" "sb" "3b" nil ".." "..." ".-" "LSep" "PSep" "LR[" "RL[" "PDF" "LRO" "RLO" 255 "%o" "%oo" "'" "''" "\"'" "`" "``" "```" ".^" "<," ",>" ":X" "!!" "?!" "'-" nil nil nil nil "-b" - "/f" nil nil nil nil nil nil nil nil nil + "/f" nil nil "??" "?!" "!?" nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil @@ -265,17 +265,17 @@ "oK" "AO" nil nil "Est" nil nil nil nil nil nil "Aleph" "Bet" "Gimel" "Dalet" "=i=" nil nil nil nil nil nil nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil nil nil - nil "1/3" "2/3" "1/5" "2/5" "3/5" "4/5" "1/6" "5/6" "1/8" + nil nil nil nil nil nil nil nil "1/7" "1/9" + "1/10" "1/3" "2/3" "1/5" "2/5" "3/5" "4/5" "1/6" "5/6" "1/8" "3/8" "5/8" "7/8" "1/" ".I" "II" "III" "IV" ".V" "VI" "VII" "VIII" "IX" "X" "XI" "XII" ".L" ".C" ".D" ".M" ".i" "ii" "iii" "iv" ".v" "vi" "vii" "viii" "ix" ".x" - "xi" ".l" ".c" ".d" ".m" "CD" "DD" "CoD" "CI" nil + "xi" "xii" ".l" ".c" ".d" ".m" "CD" "DD" "CoD" "CI" nil nil nil nil nil nil nil nil nil nil - nil "<-" "|^" "->" "|v" "<->" "v|^" "^\\" "/^" "\\v" - "v/" "<-/" "/->" "<~" "~>" "<<-" "|^^" "->>" "|vv" "<-<" - ">->" "<-|" "_|^" "|->" "-|v" "_v|^" "<-?" "?->" "<-o" "o->" - "<~>" "<-/>" nil nil nil nil nil nil nil nil + nil nil "<-" "|^" "->" "|v" "<->" "v|^" "^\\" "/^" + "\\v" "v/" "<-/" "/->" "<~" "~>" "<<-" "|^^" "->>" "|vv" + "<-<" ">->" "<-|" "_|^" "|->" "-|v" "_v|^" "<-?" "?->" "<-o" + "o->" "<~>" "<-/>" nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil "<=/" "<=/>" "/=>" "<=" "||^" "=>" "||v" @@ -299,7 +299,7 @@ "~<'" "`>~" "/<'" "/`>" "(C" ")C" "/(C" "/)C" "(_" ")_" "/(_" "/)_" nil nil nil nil nil nil nil nil nil nil nil "0+" "0-" "0x" "0/" "0." "0o" "0*" - "0=" "0_" nil nil nil nil "|T" "T|" "-T" "_T" + "0=" "0_" nil nil nil nil "|-" "-|" "-T" "_T" nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil "-,-" nil "XOR" "NAND" "NOR" nil nil nil nil nil nil @@ -357,8 +357,10 @@ "M-o" "N-o" "O-o" "P-o" "Q-o" "R-o" "S-o" "T-o" "U-o" "V-o" "W-o" "X-o" "Y-o" "Z-o" "a-o" "b-o" "c-o" "d-o" "e-o" "f-o" "g-o" "h-o" "i-o" "j-o" "k-o" "l-o" "m-o" "n-o" "o-o" "p-o" - "q-o" "r-o" "s-o" "t-o" "u-o" "v-o" "w-o" "x-o" "y-o" "z-o" - "0-o" ] + "q-o" "r-o" "s-o" "t-o" "u-o" "v-o" "w-o" "x-o" "y-o" "z-o" "0-o" ] + ) + (9733 9734 + ["-!-" "-*-"] ) ) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index db03a3244a..0cedf86bb7 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1000,7 +1000,7 @@ and added as a submenu of the \"Edit\" menu.") (defvar ispell-async-processp (and (fboundp 'delete-process) (fboundp 'process-send-string) (fboundp 'accept-process-output) - ;;(fboundp 'start-process) + ;;(fboundp 'make-process) ;;(fboundp 'set-process-filter) ;;(fboundp 'process-kill-without-query) ) diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index a8c3fcca2f..6b316c4073 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -167,7 +167,7 @@ Possible values are: (setq default-directory thisdir) (let ((inhibit-read-only t)) (insert command "\n")) - (if (and (not no-async) (fboundp 'start-process)) + (if (and (not no-async) (fboundp 'make-process)) (let ((proc (start-process "Diff" buf shell-file-name shell-command-switch command))) (set-process-filter proc 'diff-process-filter) diff --git a/lisp/window.el b/lisp/window.el index d9ac0e6d24..f7a547b915 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8543,16 +8543,17 @@ displaying that processes's buffer." (defun window--adjust-process-windows () "Update process window sizes to match the current window configuration." - (dolist (procwin (window--process-window-list)) - (let ((process (car procwin))) - (with-demoted-errors "Error adjusting window size: %S" - (with-current-buffer (process-buffer process) - (let ((size (funcall - (or (process-get process 'adjust-window-size-function) - window-adjust-process-window-size-function) - process (cdr procwin)))) - (when size - (set-process-window-size process (cdr size) (car size))))))))) + (when (fboundp 'process-list) + (dolist (procwin (window--process-window-list)) + (let ((process (car procwin))) + (with-demoted-errors "Error adjusting window size: %S" + (with-current-buffer (process-buffer process) + (let ((size (funcall + (or (process-get process 'adjust-window-size-function) + window-adjust-process-window-size-function) + process (cdr procwin)))) + (when size + (set-process-window-size process (cdr size) (car size)))))))))) (add-hook 'window-configuration-change-hook 'window--adjust-process-windows) diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 71646821a5..383105a3f3 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -15,32 +15,24 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # ---------------------------------------------------------------------- -s/^#.*// s/^[ \f\t][ \f\t]*$// s/^ / / s/\.h\.in/.h-in/ -/^MAKE *=/s/^/# / /^SHELL *=/s/^/# / /^srcdir *=/s/@[^@\n]*@/./ -/^abs_builddir *=/s|@abs_builddir@|../src| -/^VPATH *=/s/@[^@\n]*@/./ -/^CC *=/s/@[^@\n]*@/gcc/ -/^CPP *=/s/@[^@\n]*@/gcc -e/ +/^top_srcdir *=/s/@[^@\n]*@/../ +/^CC *=/s/@[^@\n]*@/gcc -std=gnu99/ /^CFLAGS *=/s/@[^@\n]*@/-O2 -gcoff/ /^ALL_CFLAGS *=/s/@[^@\n]*@//g /^ALL_CFLAGS *=/s/ -I\.//g /^CPPFLAGS *=/s|@[^@\n]*@|-I../msdos| /^LDFLAGS *=/s/@[^@\n]*@// -/^LD_FIRSTFLAG *=/s/@[^@\n]*@// -/^LIBS *=/s/@[^@\n]*@// -/^LIBES *=/,/^ *$/ { - s/@[^@\n]*@//g -} /^LIBOBJS *=/s/@[^@\n]*@// /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// /^GNUSTEP_CFLAGS *=/s/@GNUSTEP_CFLAGS@// /^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// +/^PNG_CFLAGS *=/s/@PNG_CFLAGS@// /^WARN_CFLAGS *=/s/@WARN_CFLAGS@// /^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@// /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// @@ -64,6 +56,7 @@ s/ *@LIBPNG@// s/ *@LIBGIF@// s/ *@LIBXPM@// /^XFT_LIBS *=/s/@XFT_LIBS@// +/^XCB_LIBS *=/s/@XCB_LIBS@// /^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@// /^FONTCONFIG_LIBS *=/s/@FONTCONFIG_LIBS@// /^FREETYPE_CFLAGS *=/s/@FREETYPE_CFLAGS@// @@ -78,7 +71,8 @@ s/ *@LIBXPM@// /^NOTIFY_OBJ *=/s/@NOTIFY_OBJ@// /^SETTINGS_CFLAGS *=/s/@SETTINGS_CFLAGS@// /^SETTINGS_LIBS *=/s/@SETTINGS_LIBS@// -/^GFILENOTIFY_LIBS *=/s/@GFILENOTIFY_LIBS@// +/^NOTIFY_LIBS *=/s/@NOTIFY_LIBS@// +/^NOTIFY_CFLAGS *=/s/@NOTIFY_CFLAGS@// /^GTK_OBJ *=/s/@GTK_OBJ@// /^LIBS_TERMCAP *=/s/@LIBS_TERMCAP@// /^TERMCAP_OBJ *=/s/@TERMCAP_OBJ@/termcap.o tparam.o/ @@ -92,7 +86,7 @@ s/ *@LIBXPM@// /^XGSELOBJ *=/s/@XGSELOBJ@// /^TOOLKIT_LIBW *=/s/@TOOLKIT_LIBW@// /^LIBSOUND *=/s/@LIBSOUND@// -/^LIBS_GNUSTEP *=/s/@LIBS_GNUSTEP@// +/^LIBS_GNUSTEP *=/s/=.*$/=/ /^CFLAGS_SOUND *=/s/@CFLAGS_SOUND@// /^RSVG_LIBS *=/s/@RSVG_LIBS@// /^RSVG_CFLAGS *=/s/@RSVG_CFLAGS@// @@ -101,15 +95,23 @@ s/ *@LIBXPM@// /^LIBXML2_LIBS *=/s/@LIBXML2_LIBS@// /^LIBXML2_CFLAGS *=/s/@LIBXML2_CFLAGS@// /^WIDGET_OBJ *=/s/@WIDGET_OBJ@// +/^XWIDGETS_OBJ *=/s/@XWIDGETS_OBJ@// +/^WEBKIT_LIBS *=/s/@WEBKIT_LIBS@// +/^WEBKIT_CFLAGS *=/s/@WEBKIT_CFLAGS@// +/^CAIRO_LIBS *=/s/@CAIRO_LIBS@// +/^CAIRO_CFLAGS *=/s/@CAIRO_CFLAGS@// +/^XFIXES_LIBS *=/s/@XFIXES_LIBS@// +/^XFIXES_CFLAGS *=/s/@XFIXES_CFLAGS@// /^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@// /^WINDOW_SYSTEM_OBJ *=/s/@WINDOW_SYSTEM_OBJ@// /^MSDOS_OBJ *=/s/= */= dosfns.o msdos.o w16select.o/ /^NS_OBJ *=/s/@NS_OBJ@// /^NS_OBJC_OBJ *=/s/@NS_OBJC_OBJ@// -/^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@// +/^GNU_OBJC_CFLAGS*=/s/=.*$/=/ /^LIBRESOLV *=/s/@LIBRESOLV@// +/^LIBMODULES *=/s/@LIBMODULES@// +/^MODULES_OBJ *=/s/@MODULES_OBJ@// /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@// -/^LIB_PTHREAD_SIGMASK *=/s/@[^@\n]*@// /^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g /^LIB_TIMER_TIME *=/s/@[^@\n]*@//g /^LIB_EXECINFO *=/s/@[^@\n]*@//g @@ -145,65 +147,59 @@ s/ *@LIBXPM@// /^W32_LIBS *=/s/@W32_LIBS@// /^version *=/s/@[^@\n]*@// /^EMACSRES *=/s/@EMACSRES@// -/^EMACS_MANIFEST *=/s/@EMACS_MANIFEST@// /^W32_RES_LINK *=/s/@W32_RES_LINK@// /^CM_OBJ *=/s/@CM_OBJ@/cm.o/ /^@SET_MAKE@$/s/@SET_MAKE@// -/^TEMACS_POST_LINK *=/s/@TEMACS_POST_LINK@/stubedit temacs.exe minstack=1024k/ /^ADDSECTION *=/s/@ADDSECTION@// -/^ [ ]*\$(libsrc)\/make-docfile.*>.*\/DOC/s!make-docfile!make-docfile -o $(etc)/DOC! -/^ [ ]*\$(libsrc)\/make-docfile.*>.*gl.tmp/s!make-docfile!make-docfile -o gl.tmp! -/^.\$(libsrc)\/make-doc/s!>.*$!! -/^ [ ]*\$(libsrc)\/make-docfile /s!`[^`]*`!$(lisp); cd ../src! -/^[ ]*$/d -/^\$(leimdir)\/leim-list.el: /s/bootstrap-emacs\$(EXEEXT)/temacs$(EXEEXT) $(BOOTSTRAPEMACS)/ +/^AM_DEFAULT_VERBOSITY *=/s/@AM_DEFAULT_VERBOSITY@/1/ +/^[Aa][Mm]_/s/@AM_V@/$(V)/ +/^[Aa][Mm]_/s/@AM_DEFAULT_V@/$(AM_DEFAULT_VERBOSITY)/ +/^AUTO_DEPEND *=/s/@AUTO_DEPEND@/yes/ +/^PAXCTL_if_present *=/s/=.*$/=@Rem/ +/^lisp\.mk:/,/^$/c\ +lisp.mk: $(lispsource)/loadup.el\ + @rm -f $@\ + ${AM_V_GEN}printf 'shortlisp = \\n' > $@\ + ${AM_V_GEN}sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | sed -e "s/$/.elc \/" -e "s/\.el\.elc/.el/" >> $@\ + ${AM_V_GEN}djecho "" >> $@ + +#" + +/^ [ ]*\$(AM_V_at)\$(libsrc)\/make-docfile -d/s!make-docfile!make-docfile -o $(etc)/DOC! +/ > \$(etc)\/DOC *$/s/ >.*$// +/^ [ ]*\$(AM_V_GLOBALS)\$(libsrc)\/make-docfile.*>.*globals.tmp/s!make-docfile!make-docfile -o globals.tmp! +/^ [ ]*\$(AM_V_GLOBALS)\$(libsrc)\/make-doc/s!>.*$!! +/^\$(libsrc)\/make-docfile\$(EXEEXT): /i\ + cd ../src +/^\$(leimdir)\/leim-list.el: /s/bootstrap-emacs\$(EXEEXT)/b-emacs$(EXEEXT)/ /^ if test -f/,/^ fi$/c\ command.com /c if exist .gdbinit rm -f _gdbinit -/^ *test "X\$(PAXCTL)" = X/d -/^ *test "\$(CANNOT_DUMP)" = "yes"/d -/^ if test "\$(CANNOT_DUMP)" =/,/^ else /d -/^ *\$(SETFATTR) -n/d -/^ -\{0,1\} *ln /s/bootstrap-emacs\$(EXEEXT).*$/bootstrap-emacs$(EXEEXT)/ +/^ *\$(PAXCTL_if_present) -zex/d +/^ *ln /s/ln /cp / +/^ *\$(SETFATTR_if_present) -n/d /^ fi/d +/^ *\$(RUN_TEMACS) /i\ + stubedit temacs.exe minstack=1024k /^ *LC_ALL=C \$(RUN_TEMACS)/i\ stubedit temacs.exe minstack=1024k /^ *LC_ALL=C.*\$(RUN_TEMACS)/s/LC_ALL=C/set &;/ /-batch -l loadup/a\ stubify emacs\ - stubedit emacs.exe minstack=2048k -s/ || exit 1\; \\$// -s/ || true\; \\$// + stubedit emacs.exe minstack=3072k s/ @true *$/ @rem/ s/^ [^ ]*move-if-change / update / -/^ echo[ ][ ]*timestamp/s/echo /djecho / +/^ [^ ]*echo[ ][ ]*timestamp/s/echo /djecho / /^ .*djecho timestamp/a\ - @rm -f gl.tmp -/^ cd ..\/leim && \$(MAKE)/i\ - $(RUN_TEMACS) -batch -l loadup dump\ - stubify emacs\ - stubedit emacs.exe minstack=2048k\ - rm -f b-emacs$(EXEEXT)\ - cp emacs$(EXEEXT) b-emacs$(EXEEXT) -/^ cd ..\/leim && \$(MAKE)/c\ - $(MAKE) $(MFLAGS) -C ../leim leim-list.el EMACS=$(bootstrap_exe) -/^ cd ..\/admin\/unidata && \$(MAKE)/c\ - $(MAKE) $(MFLAGS) -C ../admin/unidata all EMACS="../$(bootstrap_exe)" -/^ cd \$(lib) && \$(MAKE)/c\ - $(MAKE) $(MFLAGS) -C $(lib) libgnu.a -/^RUN_TEMACS *=/s|`/bin/pwd`|.| + @rm -f globals.tmp /^ *@\$(MKDEPDIR) *$/d /^ mv \.\/\.gdbinit/d /^ if test -f/,/^ fi$/c\ command.com /c if exist .gdbinit rm -f _gdbinit /^ #/d -/^ cd.*make-docfile/s!$!; cd ../src! /^ @: /d /^ -\{0,1\} *ln /s/ln /cp / /^[ ]touch /s/touch/djecho $@ >/ s/@YMF_PASS_LDFLAGS@/flags/ -s/@lisp_frag@// -s/@deps_frag@// -s/@ns_frag@// s/@PRE_EDIT_LDFLAGS@// s/@POST_EDIT_LDFLAGS@// s/bootstrap-emacs/b-emacs/ @@ -211,21 +207,24 @@ s/bootstrap-temacs/b-temacs/ s/bootstrap-doc/b-doc/ /rm -f bootstrap-emacs/s/b-emacs/b-emacs b-emacs.exe/ s/echo.*buildobj.lst/dj&/ -/ --load loadup bootstrap/i\ - stubedit temacs.exe minstack=1024k / --load loadup bootstrap/a\ stubify emacs /^ mv -f emacs/a\ stubedit b-emacs.exe minstack=3072k\ djecho bootlisp > bootlisp /^ -\{0,1\}rm -f/s/\\#/#/ -/^ @\{0,1\}cd ..\/lisp;.*[^\]$/s|$|\; cd ../src| -/^ *THEFILE=/s|$|\; cd ../src| /^ echo.* buildobj.h/s|echo |djecho | -/^buildobj\.h:/,/^ mv /{ - /^ *for /,/^ *done /c\ +/^buildobj\.h:/,/^ *\$(AM_V_at)mv /{ + /^ *\$(AM_V_GEN)for /,/^ *done /c\ djecho "$(ALLOBJS)" | sed -e 's/^ */"/' -e 's/ *$$/"/' -e 's/ */", "/g' >>$@.tmp } +# Remove or replace dependencies we cannot have +/^\.PRECIOUS: /s!\.\./config.status !! +/^\.\.\/config.status: /d +/^Makefile: /s!\.\./config.status !! +/^\$(top_srcdir)\/aclocal\.m4 /,/^doc\.o:/c\ +\ +doc.o: buildobj.h # Make the GCC command line fit one screen line /^[ ][ ]*\$(GNUSTEP_CFLAGS)/d /^[ ][ ]*\$(GCONF_CFLAGS)/d @@ -233,7 +232,13 @@ s/echo.*buildobj.lst/dj&/ s/\$(LIBOTF_CFLAGS) \$(M17N_FLT_CFLAGS) \$(DEPFLAGS) // s/ \$(C_SWITCH_X_SITE)// s/ \$(DBUS_CFLAGS)// -s| -I\$(srcdir)/../lib|| +s/ \$(PNG_CFLAGS) // +s/ \$(XINERAMA_CFLAGS)// +s/ \$(XFIXES_CFLAGS)// +s/ \$(FREETYPE_CFLAGS)// +s/ \$(FONTCONFIG_CFLAGS)// +s| -I\$(srcdir)/\.\./lib|| +s| -I\$(top_srcdir)/lib|| # Add our local inttypes.h to prerequisites where needed /^lread\.o:/s|lread\.c|& ../msdos/inttypes.h| /^ *test "X/d diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index aa948fd39f..9f4ff83631 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -64,7 +64,7 @@ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ -/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/ +/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION VERSION/ /^#undef PENDING_OUTPUT_COUNT/s/^.*$/#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)/ /^#undef VERSION/s/^.*$/#define VERSION "25.0.93"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ @@ -82,7 +82,6 @@ /^#undef HAVE_SIGNED_SIG_ATOMIC_T *$/s/^.*$/#define HAVE_SIGNED_SIG_ATOMIC_T 1/ /^#undef HAVE_SIGNED_WINT_T *$/s/^.*$/#define HAVE_SIGNED_WINT_T 1/ /^#undef HAVE_UNSIGNED_LONG_LONG_INT *$/s/^.*$/#define HAVE_UNSIGNED_LONG_LONG_INT 1/ -/^#undef HAVE_WCHAR_H *$/s/^.*$/#define HAVE_WCHAR_H 1/ /^#undef DEVICE_SEP *$/s/^.*$/#define DEVICE_SEP ':'/ /^#undef IS_DIRECTORY_SEP *$/s,^.*$,#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\'), /^#undef IS_DEVICE_SEP *$/s/^.*$/#define IS_DEVICE_SEP(_c_) ((_c_) == ':')/ @@ -91,6 +90,7 @@ /^#undef NULL_DEVICE *$/s/^.*$/#define NULL_DEVICE "nul"/ /^#undef SEPCHAR *$/s/^.*$/#define SEPCHAR '\;'/ /^#undef USER_FULL_NAME *$/s/^.*$/#define USER_FULL_NAME (getenv ("NAME"))/ +/^# *undef _GNU_SOURCE *$/s/^.*$/#define _GNU_SOURCE 1/ /^#undef inline/s/^.*$/#define inline __inline__/ /^#undef my_strftime/s/^.*$/#define my_strftime nstrftime/ /^#undef restrict/s/^.*$/#define restrict __restrict/ @@ -101,6 +101,7 @@ s/^#undef STACK_DIRECTION *$/#define STACK_DIRECTION -1/ s/^#undef EMACS_CONFIGURATION *$/#define EMACS_CONFIGURATION "i386-pc-msdosdjgpp"/ s/^#undef EMACS_CONFIG_OPTIONS *$/#define EMACS_CONFIG_OPTIONS "msdos"/ +s/^#undef EMACS_CONFIG_FEATURES *$/#define EMACS_CONFIG_FEATURES ""/ s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/ /^#undef HAVE_INTTYPES_H/c\ @@ -115,12 +116,14 @@ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/ #else\ #undef HAVE_STDINT_H\ #endif +s/^#undef HAVE_C_VARARRAYS *$/#define HAVE_C_VARARRAYS 1/ s/^#undef HAVE_DECL_STRTOLL *$/#define HAVE_DECL_STRTOLL 1/ s/^#undef HAVE_DECL_STRTOULL *$/#define HAVE_DECL_STRTOULL 1/ s/^#undef HAVE_DECL_STRTOIMAX *$/#define HAVE_DECL_STRTOIMAX 1/ s/^#undef HAVE_DECL_STRTOUMAX *$/#define HAVE_DECL_STRTOUMAX 1/ s/^#undef HAVE_STRTOLL *$/#define HAVE_STRTOLL 1/ s/^#undef HAVE_STRTOULL *$/#define HAVE_STRTOULL 1/ +s/^#undef HAVE_PUTENV *$/#define HAVE_PUTENV 1/ /^#undef HAVE_SIGSET_T *$/s/^.*$/#define HAVE_SIGSET_T 1/ /^#undef HAVE_SNPRINTF/c\ #if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3\ diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index 711f8fedba..49f2b76198 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp @@ -15,11 +15,8 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # ---------------------------------------------------------------------- -/^# DIST: /d /^SHELL *=/s/^/# / -/^CC *=/s/=.*$/=gcc/ -s/-DVERSION[^ ]* // -/^configname *=/s/=.*$/=msdos/ +/^CC *=/s/=.*$/=gcc -std=gnu99/ /^archlibdir *=/s!=.*$!=/emacs/bin! /^bindir *=/s!=.*$!=/emacs/bin! /^libdir *=/s!=.*$!=/emacs/bin! @@ -38,12 +35,17 @@ s/-DVERSION[^ ]* // /^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g /^LIB_TIMER_TIME *=/s/@[^@\n]*@//g /^CFLAGS *=/s!=.*$!=-O2 -g! +/^CPPFLAGS *=/s/@CPPFLAGS@// +/^LDFLAGS *=/s/@LDFLAGS@// /^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS -I../msdos! /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^WARN_CFLAGS *=/s/@WARN_CFLAGS@// /^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@// /^UPDATE_MANIFEST *=/s/@UPDATE_MANIFEST@// /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// +/^AM_DEFAULT_VERBOSITY *=/s/@AM_DEFAULT_VERBOSITY@/1/ +/^[Aa][Mm]_/s/@AM_V@/$(V)/ +/^[Aa][Mm]_/s/@AM_DEFAULT_V@/$(AM_DEFAULT_VERBOSITY)/ /^ALLOCA *=/s!@ALLOCA@!! /^EXEEXT *=/s!@EXEEXT@!.exe! /^CLIENTW *=/s/@CLIENTW@// @@ -56,9 +58,6 @@ s/-DVERSION[^ ]* // /^GETOPT_H *=/s!@GETOPT_H@!getopt.h! /^GETOPTOBJS *=/s!@GETOPTOBJS@!getopt.o getopt1.o! /^INSTALLABLES/s/emacsclient[^ ]* *// -s!^ \./! ! /^UTILITIES *=/,/^$/{ s/movemail[^ ]* *// } -/^insrcdir=/s/^.*$/\#&/ -/^ *\$(insrcdir) ||/s,\$(insrcdir) ||,command.com /c if not exist $(/ /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H *=/s/@[^@\n]*@// -/^NEXT_AS_FIRST_DIRECTIVE_STDARG_H *=/s/@[^@\n]*@// -/^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@// @@ -288,9 +289,8 @@ am__cd = cd /^NEXT_ERRNO_H *=/s/@[^@\n]*@// /^NEXT_FCNTL_H *=/s/@[^@\n]*@// /^NEXT_GETOPT_H *=/s/@[^@\n]*@// -/^NEXT_STDARG_H *=/s/@[^@\n]*@// /^NEXT_SIGNAL_H *=/s/@[^@\n]*@// -/^NEXT_STDDEF_H *=/s/@[^@\n]*@// +/^NEXT_STDDEF_H *=/s/@[^@\n]*@// /^NEXT_STDIO_H *=/s/@[^@\n]*@// /^NEXT_STDINT_H *=/s/@[^@\n]*@// /^NEXT_STDLIB_H *=/s/@[^@\n]*@// @@ -307,7 +307,8 @@ am__cd = cd /^PTHREAD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^PTRDIFF_T_SUFFIX *=/s/@[^@\n]*@// /^RANLIB *=/s/@[^@\n]*@/ranlib/ -# We never want any gnulib replacement functions +/^REPLACE_MKTIME *=/s/@[^@\n]*@/1/ +# We don't want any other gnulib replacement functions /^REPLACE_[^ =]* *= *@/s/@[^@\n]*@/0/ /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ @@ -316,15 +317,14 @@ am__cd = cd /^DIRENT_H *=/s/@[^@\n]*@// /^ERRNO_H *=/s/@[^@\n]*@// /^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/ -/^STDBOOL_H *=/s/@[^@\n]*@// /^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ -/^STDARG_H *=/s/@[^@\n]*@// -/^STDDEF_H *=/s/@[^@\n]*@// +/^STDDEF_H *=/s/@[^@\n]*@/stddef.h/ /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ /^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ +/^UNISTD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^UNDEFINE_STRTOK_R *=/s/@UNDEFINE_STRTOK_R@/0/ /^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ /^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// @@ -334,7 +334,7 @@ am__cd = cd /am__append_[1-9][0-9]* *=.*gettext\.h/s/@[^@\n]*@/\#/ /am__append_2 *=.*verify\.h/s/@[^@\n]*@// /^@gl_GNULIB_ENABLED_tempname_TRUE@/s/@[^@\n]*@// -/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o execinfo.o/ +/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o time_rz.o timegm.o mktime.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o execinfo.o/ /^am__append_[1-9][0-9]* *=/,/^[^ ]/{ s/ *inttypes\.h// s| *sys/select\.h|| @@ -342,13 +342,13 @@ am__cd = cd } /^am_libgnu_a_OBJECTS *=/,/^[^ ]/{ s/allocator\.\$(OBJEXT) // - s/binary-io\.\$(OBJEXT) // s/careadlinkat\.\$(OBJEXT) // s/pipe2\.\$(OBJEXT) // s/acl-errno-valid\.\$(OBJEXT) // - s/file-has-acl\.\$(OBJEXT) // + s/acl-internal\.\$(OBJEXT) // + s/get-permissions\.\$(OBJEXT) // + s/set-permissions\.\$(OBJEXT) // s/qcopy-acl\.\$(OBJEXT) // - s/qset-acl\.\$(OBJEXT) // s/openat-die\.\$(OBJEXT) // s/save-cwd\.\$(OBJEXT) // } @@ -396,13 +396,9 @@ s/^@GL_GENERATE_ERRNO_H_TRUE@/\#/ s/^@GL_GENERATE_ERRNO_H_FALSE@// s/^@GL_GENERATE_EXECINFO_H_TRUE@// s/^@GL_GENERATE_EXECINFO_H_FALSE@/\#/ -s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ -s/^@GL_GENERATE_STDBOOL_H_FALSE@// s/^@GL_GENERATE_STDALIGN_H_TRUE@// s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ -s/^@GL_GENERATE_STDARG_H_TRUE@/\#/ -s/^@GL_GENERATE_STDARG_H_FALSE@/\#/ -s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/ +s/^@GL_GENERATE_STDDEF_H_TRUE@// s/^@GL_GENERATE_STDDEF_H_FALSE@/\#/ s/^@GL_GENERATE_STDINT_H_TRUE@// s/^@GL_GENERATE_STDINT_H_FALSE@/\#/ diff --git a/msdos/sedlisp.inp b/msdos/sedlisp.inp index 7fa476eb07..17aa168e84 100644 --- a/msdos/sedlisp.inp +++ b/msdos/sedlisp.inp @@ -23,5 +23,9 @@ export FNCASE=y /^lisp *=/s|\$(srcdir)|$(CURDIR)| /^srcdir *=/s|@srcdir@|.| /^top_srcdir *=/s|@top_srcdir@|./..| +/^EXEEXT *=/s/@EXEEXT@/.exe/ /^XARGS_LIMIT *=/s|@XARGS_LIMIT@|| +/^AM_DEFAULT_VERBOSITY *=/s/@AM_DEFAULT_VERBOSITY@/1/ +/^[Aa][Mm]_/s/@AM_V@/$(V)/ +/^[Aa][Mm]_/s/@AM_DEFAULT_V@/$(AM_DEFAULT_VERBOSITY)/ diff --git a/src/atimer.c b/src/atimer.c index 70d9bf52bc..64c9e8ab6c 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -30,6 +30,10 @@ along with GNU Emacs. If not, see . */ # include #endif +#ifdef MSDOS +#include "msdos.h" +#endif + /* Free-list of atimer structures. */ static struct atimer *free_atimers; diff --git a/src/conf_post.h b/src/conf_post.h index d0f04b6370..209f60792c 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -145,6 +145,9 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ # define HAVE_LSTAT 1 #else # define lstat stat +/* DJGPP 2.03 and older don't have the next two. */ +# define EOVERFLOW ERANGE +# define SIZE_MAX 4294967295U #endif /* We must intercept 'opendir' calls to stash away the directory name, diff --git a/src/deps.mk b/src/deps.mk index 0295e705a9..72f68cabfc 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -35,7 +35,7 @@ ### Code: atimer.o: atimer.c atimer.h syssignal.h systime.h lisp.h blockinput.h \ - globals.h ../lib/unistd.h $(config_h) + globals.h ../lib/unistd.h msdos.h $(config_h) bidi.o: bidi.c buffer.h character.h dispextern.h msdos.h lisp.h \ globals.h $(config_h) buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \ @@ -92,7 +92,7 @@ editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \ globals.h ../lib/unistd.h window.h dispextern.h keyboard.h keymap.h \ - frame.h coding.h gnutls.h msdos.h unexec.h + frame.h coding.h gnutls.h msdos.h dosfns.h unexec.h fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h \ commands.h globals.h ../lib/unistd.h diff --git a/src/dosfns.h b/src/dosfns.h index 9fbf7eda19..849fb91a7a 100644 --- a/src/dosfns.h +++ b/src/dosfns.h @@ -24,6 +24,10 @@ along with GNU Emacs. If not, see . */ extern unsigned char dos_country_info[DOS_COUNTRY_INFO]; extern int dos_memory_info (unsigned long *, unsigned long *, unsigned long *, unsigned long *); +void dos_cleanup (void); +void syms_of_dosfns (void); +void init_dosfns (void); + #ifndef HAVE_X_WINDOWS extern int msdos_stdcolor_idx (const char *); extern Lisp_Object msdos_stdcolor_name (int); diff --git a/src/emacs.c b/src/emacs.c index d1d649dfcf..5c187e76ba 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -54,6 +54,7 @@ along with GNU Emacs. If not, see . */ #ifdef MSDOS #include +#include "dosfns.h" #endif #ifdef HAVE_WINDOW_SYSTEM diff --git a/src/filelock.c b/src/filelock.c index bc3a6209a8..8aaa656438 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -53,6 +53,8 @@ along with GNU Emacs. If not, see . */ #include "w32.h" /* for dostounix_filename */ #endif +#ifndef MSDOS + #ifdef HAVE_UTMP_H #include #endif @@ -742,6 +744,19 @@ unlock_file (Lisp_Object fn) SAFE_FREE (); } +#else /* MSDOS */ +void +lock_file (Lisp_Object fn) +{ +} + +void +unlock_file (Lisp_Object fn) +{ +} + +#endif /* MSDOS */ + void unlock_all_files (void) { @@ -805,6 +820,9 @@ The value is nil if the FILENAME is not locked, t if it is locked by you, else a string saying which user has locked it. */) (Lisp_Object filename) { +#ifdef MSDOS + return Qnil; +#else Lisp_Object ret; char *lfname; int owner; @@ -825,6 +843,7 @@ t if it is locked by you, else a string saying which user has locked it. */) SAFE_FREE (); return ret; +#endif } void diff --git a/src/fns.c b/src/fns.c index 47ed2d8220..a65863ce0e 100644 --- a/src/fns.c +++ b/src/fns.c @@ -32,8 +32,13 @@ along with GNU Emacs. If not, see . */ #include "intervals.h" #include "window.h" +#if __GNUC__ >= 4 static void sort_vector_copy (Lisp_Object, ptrdiff_t, Lisp_Object [restrict], Lisp_Object [restrict]); +#else +static void sort_vector_copy (Lisp_Object, ptrdiff_t, + Lisp_Object [], Lisp_Object []); +#endif static bool internal_equal (Lisp_Object, Lisp_Object, int, bool, Lisp_Object); DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, diff --git a/src/frame.c b/src/frame.c index 53ff05965c..00f25f7e91 100644 --- a/src/frame.c +++ b/src/frame.c @@ -509,10 +509,13 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, block_input (); #ifdef MSDOS - /* We only can set screen dimensions to certain values supported - by our video hardware. Try to find the smallest size greater - or equal to the requested dimensions. */ - dos_set_window_size (&new_lines, &new_cols); + /* We only can set screen dimensions to certain values supported by + our video hardware. Try to find the smallest size greater or + equal to the requested dimensions, while accounting for the fact + that the menu-bar lines are not counted in the frame height. */ + int dos_new_lines = new_lines + FRAME_TOP_MARGIN (f); + dos_set_window_size (&dos_new_lines, &new_cols); + new_lines = dos_new_lines - FRAME_TOP_MARGIN (f); #endif if (new_windows_width != old_windows_width) diff --git a/src/lread.c b/src/lread.c index 91469230b7..d374406e7b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -46,6 +46,10 @@ along with GNU Emacs. If not, see . */ #ifdef MSDOS #include "msdos.h" +#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 5 +# define INFINITY __builtin_inf() +# define NAN __builtin_nan("") +#endif #endif #ifdef HAVE_NS diff --git a/src/msdos.c b/src/msdos.c index 84e8c39ec0..62411ea2f6 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -59,6 +59,12 @@ along with GNU Emacs. If not, see . */ #include /* for _USE_LFN */ #include /* for cputs */ +#if (__DJGPP__ + (__DJGPP_MINOR__ > 3)) >= 3 +#define SYS_ENVIRON _environ +#else +#define SYS_ENVIRON environ +#endif + #include "msdos.h" #include "systime.h" #include "frame.h" @@ -422,8 +428,6 @@ static unsigned long screen_old_address = 0; /* Segment and offset of the virtual screen. If 0, DOS/V is NOT loaded. */ static unsigned short screen_virtual_segment = 0; static unsigned short screen_virtual_offset = 0; -extern Lisp_Object Qcursor_type; -extern Lisp_Object Qbar, Qhbar; /* The screen colors of the current frame, which serve as the default colors for newly-created frames. */ @@ -1384,11 +1388,6 @@ IT_delete_glyphs (struct frame *f, int n) /* This was copied from xfaces.c */ -extern Lisp_Object Qbackground_color; -extern Lisp_Object Qforeground_color; -Lisp_Object Qreverse; -extern Lisp_Object Qtitle; - /* IT_set_terminal_modes is called when emacs is started, resumed, and whenever the screen is redrawn! */ @@ -3710,7 +3709,7 @@ dos_ttcooked (void) file TEMPOUT and stderr to TEMPERR. */ int -run_msdos_command (unsigned char **argv, const char *working_dir, +run_msdos_command (char **argv, const char *working_dir, int tempin, int tempout, int temperr, char **envv) { char *saveargv1, *saveargv2, *lowcase_argv0, *pa, *pl; @@ -3796,8 +3795,8 @@ run_msdos_command (unsigned char **argv, const char *working_dir, ; if (*cmnd) { - extern char **environ; - char **save_env = environ; + extern char **SYS_ENVIRON; + char **save_env = SYS_ENVIRON; int save_system_flags = __system_flags; /* Request the most powerful version of `system'. We need @@ -3809,16 +3808,16 @@ run_msdos_command (unsigned char **argv, const char *working_dir, | __system_handle_null_commands | __system_emulate_chdir); - environ = envv; + SYS_ENVIRON = envv; result = system (cmnd); __system_flags = save_system_flags; - environ = save_env; + SYS_ENVIRON = save_env; } else result = 0; /* emulate Unixy shell behavior with empty cmd line */ } else - result = spawnve (P_WAIT, argv[0], (char **)argv, envv); + result = spawnve (P_WAIT, argv[0], argv, envv); dup2 (inbak, 0); dup2 (outbak, 1); @@ -4085,11 +4084,14 @@ sys_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, gettime (&t); clnow = make_timespec (t.tv_sec, t.tv_nsec); cldiff = timespec_sub (clnow, cllast); + /* Stop when timeout value is about to cross zero. */ + if (timespec_cmp (*timeout, cldiff) <= 0) + { + timeout->tv_sec = 0; + timeout->tv_nsec = 0; + return 0; + } *timeout = timespec_sub (*timeout, cldiff); - - /* Stop when timeout value crosses zero. */ - if (timespec_sign (*timeout) <= 0) - return 0; cllast = clnow; dos_yield_time_slice (); } diff --git a/src/msdos.h b/src/msdos.h index 863ca486e8..0c3ba2bfa1 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -41,8 +41,12 @@ void mouse_on (void); void mouse_off (void); void mouse_moveto (int, int); +void IT_set_frame_parameters (struct frame *, Lisp_Object); + #include #include +#include +#include #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4 int readlink (const char *, char *, size_t); @@ -50,6 +54,16 @@ int readlink (const char *, char *, size_t); ssize_t readlinkat (int, const char *, char *, size_t); int fstatat (int, char const *, struct stat *, int); int unsetenv (const char *); +int faccessat (int, const char *, int, int); +void msdos_fatal_signal (int); +void syms_of_msdos (void); +int pthread_sigmask (int, const sigset_t *, sigset_t *); +int dos_keysns (void); +int dos_keyread (void); +int run_msdos_command (char **, const char *, int, int, int, char **); + +void syms_of_win16select (void); + /* Constants. */ #define EINPROGRESS 112 diff --git a/src/process.c b/src/process.c index dd508836f7..2c758a4c9a 100644 --- a/src/process.c +++ b/src/process.c @@ -4085,19 +4085,6 @@ Data that is unavailable is returned as nil. */) #endif } -/* If program file NAME starts with /: for quoting a magic - name, remove that, preserving the multibyteness of NAME. */ - -Lisp_Object -remove_slash_colon (Lisp_Object name) -{ - return - ((SBYTES (name) > 2 && SREF (name, 0) == '/' && SREF (name, 1) == ':') - ? make_specified_string (SSDATA (name) + 2, SCHARS (name) - 2, - SBYTES (name) - 2, STRING_MULTIBYTE (name)) - : name); -} - /* Turn off input and output for process PROC. */ static void @@ -7118,6 +7105,19 @@ add_timer_wait_descriptor (int fd) #endif /* HAVE_TIMERFD */ +/* If program file NAME starts with /: for quoting a magic + name, remove that, preserving the multibyteness of NAME. */ + +Lisp_Object +remove_slash_colon (Lisp_Object name) +{ + return + ((SBYTES (name) > 2 && SREF (name, 0) == '/' && SREF (name, 1) == ':') + ? make_specified_string (SSDATA (name) + 2, SCHARS (name) - 2, + SBYTES (name) - 2, STRING_MULTIBYTE (name)) + : name); +} + /* Add DESC to the set of keyboard input descriptors. */ void @@ -7643,13 +7643,6 @@ The variable takes effect when `start-process' is called. */); defsubr (&Sset_process_filter_multibyte); defsubr (&Sprocess_filter_multibyte_p); -#endif /* subprocesses */ - - defsubr (&Sget_buffer_process); - defsubr (&Sprocess_inherit_coding_system_flag); - defsubr (&Slist_system_processes); - defsubr (&Sprocess_attributes); - { Lisp_Object subfeatures = Qnil; const struct socket_options *sopt; @@ -7684,4 +7677,10 @@ The variable takes effect when `start-process' is called. */); Fprovide (intern_c_string ("make-network-process"), subfeatures); } +#endif /* subprocesses */ + + defsubr (&Sget_buffer_process); + defsubr (&Sprocess_inherit_coding_system_flag); + defsubr (&Slist_system_processes); + defsubr (&Sprocess_attributes); } diff --git a/src/w16select.c b/src/w16select.c index 434a598789..208cfccf11 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -65,8 +65,6 @@ unsigned get_clipboard_data (unsigned, void *, unsigned, int); unsigned close_clipboard (void); unsigned clipboard_compact (unsigned); -Lisp_Object QCLIPBOARD, QPRIMARY; - /* The segment address and the size of the buffer in low memory used to move data between us and WinOldAp module. */ static struct { @@ -719,8 +717,7 @@ variable is set, it is used for the next communication only. After the communication, this variable is set to nil. */); Vnext_selection_coding_system = Qnil; - QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); - QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); + DEFSYM (QCLIPBOARD, "CLIPBOARD"); } #endif /* MSDOS */ -- cgit v1.2.3 From 70044595f9748eb4fe587cb019431bf1a323f9a5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Apr 2016 14:14:57 +0300 Subject: Improve doc string of 'set-goal-column' * lisp/simple.el (set-goal-column): Doc fix. (Bug#23405) --- lisp/simple.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 2a81ee745c..d7743eea59 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6406,7 +6406,8 @@ Those commands will move to this position in the line moved to rather than trying to keep the same horizontal position. With a non-nil argument ARG, clears out the goal column so that \\[next-line] and \\[previous-line] resume vertical motion. -The goal column is stored in the variable `goal-column'." +The goal column is stored in the variable `goal-column'. +This is a buffer-local setting." (interactive "P") (if arg (progn -- cgit v1.2.3 From 86aa4094d7f8bb68863759cf109a046f4bad450d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Apr 2016 14:18:43 +0300 Subject: Followup for last commit in the user manual * doc/emacs/basic.texi (Moving Point): Clarify that set-goal-column has buffer-local effect. (Bug#23405) --- doc/emacs/basic.texi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 68581d03a8..b6939be490 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -337,10 +337,11 @@ move to the column number specified by the argument's numeric value. @kindex C-x C-n @findex set-goal-column Use the current column of point as the @dfn{semipermanent goal column} -for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). When a -semipermanent goal column is in effect, those commands always try to -move to this column, or as close as possible to it, after moving -vertically. The goal column remains in effect until canceled. +for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}) in the current +buffer. When a semipermanent goal column is in effect, those commands +always try to move to this column, or as close as possible to it, +after moving vertically. The goal column remains in effect until +canceled. @item C-u C-x C-n Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to -- cgit v1.2.3 From b52ebd4f20ecc3f207a88cf7ac18c745b6e8ef80 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Sat, 30 Apr 2016 08:43:39 +0100 Subject: org-map-entries: Fix org-agenda-prepare-buffers call * lisp/org.el (org-map-entries): Check that buffer-file-name is non-nil before passing to org-agenda-prepare-buffers. This is a backport of commit 44c8cd7136e3fcd1e6bfa08895cac437b7a691fa from upstream org-mode. Addresses bug #23365. --- lisp/org/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org/org.el b/lisp/org/org.el index 231daa9a6a..61bcb451d7 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -15069,7 +15069,7 @@ a *different* entry, you cannot use these techniques." (if (not scope) (progn (org-agenda-prepare-buffers - (list (buffer-file-name (current-buffer)))) + (and buffer-file-name (list buffer-file-name))) (setq res (org-scan-tags func matcher todo-only start-level))) ;; Get the right scope (cond @@ -15081,7 +15081,7 @@ a *different* entry, you cannot use these techniques." (setq scope (org-agenda-files t)) (setq scope (org-add-archive-files scope))) ((eq scope 'file) - (setq scope (list (buffer-file-name)))) + (setq scope (and buffer-file-name (list buffer-file-name)))) ((eq scope 'file-with-archives) (setq scope (org-add-archive-files (list (buffer-file-name)))))) (org-agenda-prepare-buffers scope) -- cgit v1.2.3 From b755d988b498b19bd9a70a5dd8c6597ceb14a372 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 30 Apr 2016 23:35:27 +0800 Subject: Autoload cursor-sensor-inhibit (bug#23406) * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-inhibit): Autoload. * lisp/isearch.el (isearch-update): Remove boundp check. --- lisp/emacs-lisp/cursor-sensor.el | 1 + lisp/isearch.el | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el index f1ab82ecc4..2231179de1 100644 --- a/lisp/emacs-lisp/cursor-sensor.el +++ b/lisp/emacs-lisp/cursor-sensor.el @@ -31,6 +31,7 @@ ;;; Code: +;;;###autoload (defvar cursor-sensor-inhibit nil) (defun cursor-sensor--intangible-p (pos) diff --git a/lisp/isearch.el b/lisp/isearch.el index 48354d39d4..17b5ef14cb 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -840,7 +840,6 @@ See the command `isearch-forward-symbol' for more information." (isearch-update))))) -(defvar cursor-sensor-inhibit) ;; isearch-mode only sets up incremental search for the minor mode. ;; All the work is done by the isearch-mode commands. @@ -973,8 +972,7 @@ The last thing is to trigger a new round of lazy highlighting." (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit)))) (setq isearch--current-buffer (current-buffer)) (make-local-variable 'cursor-sensor-inhibit) - (unless (boundp 'cursor-sensor-inhibit) - (setq cursor-sensor-inhibit nil)) + (setq cursor-sensor-inhibit nil) ;; Suspend things like cursor-intangible during Isearch so we can search ;; even within intangible text. (push 'isearch cursor-sensor-inhibit)) -- cgit v1.2.3 From 16e5e8e4ea4ad46157fcdeafb16f245124fba375 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sun, 1 May 2016 11:03:59 +0800 Subject: Fix last change to isearch-update (bug#23406) * lisp/isearch.el (isearch-update): Remove (setq cursor-sensor-inhibit nil) ie remove the original (unless (boundp 'cursor-sensor-inhibit) ...) form. --- lisp/isearch.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index 17b5ef14cb..218c18a666 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -972,7 +972,6 @@ The last thing is to trigger a new round of lazy highlighting." (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit)))) (setq isearch--current-buffer (current-buffer)) (make-local-variable 'cursor-sensor-inhibit) - (setq cursor-sensor-inhibit nil) ;; Suspend things like cursor-intangible during Isearch so we can search ;; even within intangible text. (push 'isearch cursor-sensor-inhibit)) -- cgit v1.2.3