diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d27b2a44c15..13aacfc85dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2013-02-02 Stefan Monnier + + * mouse.el (mouse-drag-track): Always deactivate the mark before + running the final event's command since that command is in charge of + activating the mark if needed (bug#13523). + +2013-02-02 Juri Linkov + + * replace.el (perform-replace): Move let-bindings of isearch-* + variables deeper to the loop that searches for the next match. + Add bindings for `isearch-nonincremental' and `isearch-adjusted'. + Use `isearch-search-fun-default' instead of `isearch-search-fun'. + (Bug#13579) + + * isearch.el (isearch-search-fun-default): Check for null + first element of isearch-cmds as a precaution when it's used + with inactive isearch. + +2013-02-02 Andrew W. Nosenko (tiny change) + + * net/tramp.el (tramp-check-for-regexp): Avoid "Args out of range" + error when buffer in question is narrowed so position 1 is out of + visible part. + +2013-02-02 Glenn Morris + + * textmodes/remember.el (remember-clipboard): Doc fix. + +2013-02-02 Stefan Monnier + + * progmodes/make-mode.el (makefile-fill-paragraph): Reset syntax-table + properties (bug#13179). + 2013-02-02 Juri Linkov * progmodes/grep.el (grep-regexp-alist): Use variable grep-match-face diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el index d876b65303c..e8720bc6624 100644 --- a/lisp/cedet/cedet.el +++ b/lisp/cedet/cedet.el @@ -4,7 +4,7 @@ ;; Author: David Ponce ;; Maintainer: Eric M. Ludlam -;; Version: 1.1 +;; Version: 2.0 ;; Keywords: OO, lisp ;; This file is part of GNU Emacs. @@ -35,7 +35,7 @@ (declare-function inversion-find-version "inversion") -(defconst cedet-version "1.1" +(defconst cedet-version "2.0" "Current version of CEDET.") (defconst cedet-packages @@ -43,12 +43,12 @@ ;;PACKAGE MIN-VERSION INSTALLDIR DOCDIR (cedet ,cedet-version "common" "common" ) (eieio "1.4" nil "eieio" ) - (semantic "2.1" nil "semantic/doc") - (srecode "1.1" nil "srecode" ) - (ede "1.1" nil "ede" ) + (semantic "2.2" nil "semantic/doc") + (srecode "1.2" nil "srecode" ) + (ede "1.2" nil "ede" ) (speedbar "1.0.4" nil "speedbar" ) - (cogre "1.1" nil "cogre" ) - (cedet-contrib "1.1" "contrib" nil ) + (cogre "1.2" nil "cogre" ) + (cedet-contrib "1.2" "contrib" nil ) ) "Table of CEDET packages to install.") diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 12b8f558d65..3867f628b93 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -4,7 +4,7 @@ ;; Author: Eric M. Ludlam ;; Keywords: project, make -;; Version: 1.0 +;; Version: 1.2 ;; This file is part of GNU Emacs. @@ -60,7 +60,7 @@ (declare-function ede-up-directory "ede/files") (declare-function semantic-lex-make-spp-table "semantic/lex-spp") -(defconst ede-version "1.0" +(defconst ede-version "1.2" "Current version of the Emacs EDE.") ;;; Code: diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el index decd3b15812..edf2d0cb21a 100644 --- a/lisp/cedet/semantic.el +++ b/lisp/cedet/semantic.el @@ -4,7 +4,7 @@ ;; Author: Eric M. Ludlam ;; Keywords: syntax tools -;; Version: 2.1beta +;; Version: 2.2 ;; This file is part of GNU Emacs. @@ -38,7 +38,7 @@ (require 'semantic/tag) (require 'semantic/lex) -(defvar semantic-version "2.1beta" +(defvar semantic-version "2.2" "Current version of Semantic.") (declare-function inversion-test "inversion") diff --git a/lisp/cedet/srecode.el b/lisp/cedet/srecode.el index 3201374bc92..2e2cb8a3f80 100644 --- a/lisp/cedet/srecode.el +++ b/lisp/cedet/srecode.el @@ -4,7 +4,7 @@ ;; Author: Eric M. Ludlam ;; Keywords: codegeneration -;; Version: 1.0 +;; Version: 1.2 ;; This file is part of GNU Emacs. @@ -41,7 +41,7 @@ (require 'mode-local) (load "srecode/loaddefs" nil 'nomessage) -(defvar srecode-version "1.0" +(defvar srecode-version "1.2" "Current version of the Semantic Recoder.") ;;; Code: diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 7a22e1222c9..626bc0f6dc6 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -4,7 +4,7 @@ ;; Copyright (C) 1995-1996, 1998-2013 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam -;; Version: 1.3 +;; Version: 1.4 ;; Keywords: OO, lisp ;; This file is part of GNU Emacs. @@ -46,7 +46,7 @@ (eval-when-compile (require 'cl)) ;FIXME: Use cl-lib! -(defvar eieio-version "1.3" +(defvar eieio-version "1.4" "Current version of EIEIO.") (defun eieio-version () diff --git a/lisp/isearch.el b/lisp/isearch.el index e16e3840d0d..31b1918429f 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2520,6 +2520,7 @@ Can be changed via `isearch-search-fun-function' for special needs." ;; the user adds and removes characters in the search string ;; (or when using nonincremental word isearch) (let ((lax (not (or isearch-nonincremental + (null (car isearch-cmds)) (eq (length isearch-string) (length (isearch--state-string (car isearch-cmds)))))))) diff --git a/lisp/mouse.el b/lisp/mouse.el index 9c7bf6f9c36..a1aa104495a 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -880,9 +880,9 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by (copy-region-as-kill (mark) (point))))) ;; Otherwise, run binding of terminating up-event. + (deactivate-mark) (if do-multi-click (goto-char start-point) - (deactivate-mark) (unless moved-off-start (pop-mark))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4f31e95aeff..1dee9e89676 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3413,7 +3413,9 @@ Erase echoed commands if exists." 0 (min tramp-echo-mark-marker-length (1- (point-max)))) (tramp-compat-funcall 'buffer-substring-no-properties - 1 (min (1+ tramp-echo-mark-marker-length) (point-max)))))) + (point-min) + (min (+ (point-min) tramp-echo-mark-marker-length) + (point-max)))))) ;; No echo to be handled, now we can look for the regexp. ;; Sometimes, lines are much to long, and we run into a "Stack ;; overflow in regexp matcher". For example, //DIRED// lines of diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index be718135f99..60807f10742 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1304,6 +1304,12 @@ Fill comments, backslashed lines, and variable definitions specially." (save-restriction (narrow-to-region beginning end) (makefile-backslash-region (point-min) (point-max) t) + ;; Backslashed newlines are marked as puncutations, so when + ;; fill-delete-newlines turns the LF into SPC, we end up with spaces + ;; which back-to-indentation (called via fill-newline -> + ;; fill-indent-to-left-margin -> indent-line-to) thinks are real code + ;; (bug#13179). + (remove-text-properties (point-min) (point-max) '(syntax-table)) (let ((fill-paragraph-function nil) ;; Adjust fill-column to allow space for the backslash. (fill-column (- fill-column 1))) diff --git a/lisp/replace.el b/lisp/replace.el index fb251821445..7757426cf95 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1819,19 +1819,6 @@ make, or the user didn't cancel the call." case-fold-search)) (nocasify (not (and case-replace case-fold-search))) (literal (or (not regexp-flag) (eq regexp-flag 'literal))) - (search-function - (or (if regexp-flag - replace-re-search-function - replace-search-function) - (let ((isearch-regexp regexp-flag) - (isearch-word delimited-flag) - (isearch-lax-whitespace - replace-lax-whitespace) - (isearch-regexp-lax-whitespace - replace-regexp-lax-whitespace) - (isearch-case-fold-search case-fold-search) - (isearch-forward t)) - (isearch-search-fun)))) (search-string from-string) (real-match-data nil) ; The match data for the current match. (next-replacement nil) @@ -1894,39 +1881,62 @@ make, or the user didn't cancel the call." ;; Loop finding occurrences that perhaps should be replaced. (while (and keep-going (not (or (eobp) (and limit (>= (point) limit)))) - ;; Use the next match if it is already known; - ;; otherwise, search for a match after moving forward - ;; one char if progress is required. - (setq real-match-data - (cond ((consp match-again) - (goto-char (nth 1 match-again)) - (replace-match-data - t real-match-data match-again)) - ;; MATCH-AGAIN non-nil means accept an - ;; adjacent match. - (match-again - (and - (funcall search-function search-string - limit t) - ;; For speed, use only integers and - ;; reuse the list used last time. - (replace-match-data t real-match-data))) - ((and (< (1+ (point)) (point-max)) - (or (null limit) - (< (1+ (point)) limit))) - ;; If not accepting adjacent matches, - ;; move one char to the right before - ;; searching again. Undo the motion - ;; if the search fails. - (let ((opoint (point))) - (forward-char 1) - (if (funcall - search-function search-string - limit t) - (replace-match-data - t real-match-data) - (goto-char opoint) - nil)))))) + ;; Let-bind global isearch-* variables to values used + ;; to search the next replacement. These let-bindings + ;; should be effective both at the time of calling + ;; `isearch-search-fun-default' and also at the + ;; time of funcalling `search-function'. + ;; These isearch-* bindings can't be placed higher + ;; outside of this loop because then another I-search + ;; used after `recursive-edit' might override them. + (let* ((isearch-regexp regexp-flag) + (isearch-word delimited-flag) + (isearch-lax-whitespace + replace-lax-whitespace) + (isearch-regexp-lax-whitespace + replace-regexp-lax-whitespace) + (isearch-case-fold-search case-fold-search) + (isearch-adjusted nil) + (isearch-nonincremental t) ; don't use lax word mode + (isearch-forward t) + (search-function + (or (if regexp-flag + replace-re-search-function + replace-search-function) + (isearch-search-fun-default)))) + ;; Use the next match if it is already known; + ;; otherwise, search for a match after moving forward + ;; one char if progress is required. + (setq real-match-data + (cond ((consp match-again) + (goto-char (nth 1 match-again)) + (replace-match-data + t real-match-data match-again)) + ;; MATCH-AGAIN non-nil means accept an + ;; adjacent match. + (match-again + (and + (funcall search-function search-string + limit t) + ;; For speed, use only integers and + ;; reuse the list used last time. + (replace-match-data t real-match-data))) + ((and (< (1+ (point)) (point-max)) + (or (null limit) + (< (1+ (point)) limit))) + ;; If not accepting adjacent matches, + ;; move one char to the right before + ;; searching again. Undo the motion + ;; if the search fails. + (let ((opoint (point))) + (forward-char 1) + (if (funcall + search-function search-string + limit t) + (replace-match-data + t real-match-data) + (goto-char opoint) + nil))))))) ;; Record whether the match is nonempty, to avoid an infinite loop ;; repeatedly matching the same empty string. diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 6ff4c720b71..eeb04ef250f 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -432,8 +432,7 @@ If you want to remember a region, supply a universal prefix to ;;;###autoload (defun remember-clipboard () "Remember the contents of the current clipboard. -Most useful for remembering things from Netscape or other X Windows -application." +Most useful for remembering things from other applications." (interactive) (remember (current-kill 0))) diff --git a/src/ChangeLog b/src/ChangeLog index b4c3195973c..302010ec769 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2013-02-02 Eli Zaretskii + + * callproc.c (Fcall_process): Make sure program name in PATH and + new_argv[0] is encoded, if needed. Otherwise, un-encoded string + is passed to exec/spawnve, which fails unless the file-name + encoding is UTF-8. + + * w32proc.c (sys_spawnve): Make sure escape_char is initialized, + even if w32-quote-process-args is nil. + 2013-02-01 Paul Eggert Fix timestamp bug when write-region appends nothing (Bug#13149). diff --git a/src/callproc.c b/src/callproc.c index 5eba3271358..9d81bb18295 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -445,28 +445,34 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) path = Fsubstring (path, make_number (2), Qnil); new_argv = SAFE_ALLOCA ((nargs > 4 ? nargs - 2 : 2) * sizeof *new_argv); - if (nargs > 4) - { - ptrdiff_t i; - struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; - GCPRO5 (infile, buffer, current_dir, path, error_file); - argument_coding.dst_multibyte = 0; - for (i = 4; i < nargs; i++) - { - argument_coding.src_multibyte = STRING_MULTIBYTE (args[i]); - if (CODING_REQUIRE_ENCODING (&argument_coding)) - /* We must encode this argument. */ - args[i] = encode_coding_string (&argument_coding, args[i], 1); - } - UNGCPRO; - for (i = 4; i < nargs; i++) - new_argv[i - 3] = SSDATA (args[i]); - new_argv[i - 3] = 0; - } - else - new_argv[1] = 0; - new_argv[0] = SSDATA (path); + { + struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; + + GCPRO5 (infile, buffer, current_dir, path, error_file); + if (nargs > 4) + { + ptrdiff_t i; + + argument_coding.dst_multibyte = 0; + for (i = 4; i < nargs; i++) + { + argument_coding.src_multibyte = STRING_MULTIBYTE (args[i]); + if (CODING_REQUIRE_ENCODING (&argument_coding)) + /* We must encode this argument. */ + args[i] = encode_coding_string (&argument_coding, args[i], 1); + } + for (i = 4; i < nargs; i++) + new_argv[i - 3] = SSDATA (args[i]); + new_argv[i - 3] = 0; + } + else + new_argv[1] = 0; + if (STRING_MULTIBYTE (path)) + path = ENCODE_FILE (path); + new_argv[0] = SSDATA (path); + UNGCPRO; + } #ifdef MSDOS /* MW, July 1993 */ diff --git a/src/w32proc.c b/src/w32proc.c index 0fcb2993020..615e5329e8c 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -1541,7 +1541,6 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) child_process *cp; int is_dos_app, is_cygnus_app, is_gui_app; int do_quoting = 0; - char escape_char; /* We pass our process ID to our children by setting up an environment variable in their environment. */ char ppid_env_var_buffer[64]; @@ -1554,6 +1553,8 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) Some extra whitespace characters need quoting in Cygwin programs, so this list is conditionally modified below. */ char *sepchars = " \t*?"; + /* This is for native w32 apps; modified below for Cygwin apps. */ + char escape_char = '\\'; /* We don't care about the other modes */ if (mode != _P_NOWAIT)