diff options
| author | Fabián Ezequiel Gallina | 2014-12-27 13:15:55 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2014-12-27 13:15:55 -0300 |
| commit | 3a12f2ed99734eff668f83f630c7108000e0b399 (patch) | |
| tree | d00367f58fbe82773b1f45771df827d22f83d939 | |
| parent | 6d14e0d361cfb3589874fe1b559e30b4fd3eb284 (diff) | |
| parent | 2616307f5c517124715b4d20bdd23c6c70366ac9 (diff) | |
| download | emacs-3a12f2ed99734eff668f83f630c7108000e0b399.tar.gz emacs-3a12f2ed99734eff668f83f630c7108000e0b399.zip | |
Merge from origin/emacs-24
2616307 * net/tramp-sh.el (tramp-send-command-and-read): New optional arg MARKER. (tramp-get-remote-path): Use it.
c773edc * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in wrong debug buffer. (tramp-gw-open-connection): Set process coding system 'binary. (tramp-gw-open-network-stream): Handle HTTP error 403.
8032fc1 * .gitignore: Ignore /conftest*.
fb420e7 * lisp/subr.el (sit-for): Tweak docstring.
061db13 Fix vc-git-dir-status-files WRT up-to-date vs edited
bb57c94 Consider electric-pair-mode in tex-mode.
7b94572 * test/automated/flymake/warnpred/test.pl: Tweak earlier change.
59c218f ChangeLog fix
db2a768 * test/automated/flymake/warnpred/test.pl: Tweak format
d9005dd src/gnutls.c (gnutls_init): Fix deprecation warning from GCC.
Conflicts:
ChangeLog
lisp/ChangeLog
src/ChangeLog
test/ChangeLog
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | ChangeLog | 13 | ||||
| -rwxr-xr-x | build-aux/git-hooks/commit-msg | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 36 | ||||
| -rw-r--r-- | lisp/net/tramp-gw.el | 9 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 45 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 16 | ||||
| -rw-r--r-- | lisp/subr.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 50 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 7 | ||||
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/buffer.c | 4 | ||||
| -rw-r--r-- | src/gnutls.c | 2 | ||||
| -rw-r--r-- | test/ChangeLog | 11 | ||||
| -rw-r--r-- | test/automated/data/flymake/test.pl | 2 | ||||
| -rw-r--r-- | test/automated/electric-tests.el | 11 |
16 files changed, 178 insertions, 49 deletions
diff --git a/.gitignore b/.gitignore index d05352e7124..97adfb95610 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -48,6 +48,7 @@ makefile | |||
| 48 | /confdefs.h | 48 | /confdefs.h |
| 49 | /config.status | 49 | /config.status |
| 50 | /configure.lineno | 50 | /configure.lineno |
| 51 | /conftest* | ||
| 51 | src/config.h | 52 | src/config.h |
| 52 | src/epaths.h | 53 | src/epaths.h |
| 53 | 54 | ||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-12-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * .gitignore: Ignore /conftest*. | ||
| 4 | |||
| 5 | 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | |||
| 7 | * build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit | ||
| 8 | to 78. | ||
| 9 | |||
| 10 | 2014-12-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 1 | 2014-12-25 Paul Eggert <eggert@cs.ucla.edu> | 11 | 2014-12-25 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 12 | ||
| 3 | Prefer stpcpy to strcat | 13 | Prefer stpcpy to strcat |
| @@ -308,7 +318,8 @@ | |||
| 308 | 318 | ||
| 309 | 2014-11-11 Eric S. Raymond <esr@thyrsus.com> | 319 | 2014-11-11 Eric S. Raymond <esr@thyrsus.com> |
| 310 | 320 | ||
| 311 | * Makefile.in: git transition - set VCWITNESS appropriately for git. | 321 | Git transition. |
| 322 | * Makefile.in (src): Set VCSWITNESS appropriately for git. | ||
| 312 | 323 | ||
| 313 | All bzr revision IDS, and all CVS revision IDs for which a commit | 324 | All bzr revision IDS, and all CVS revision IDs for which a commit |
| 314 | could be identified, were changed to time-date!committer version | 325 | could be identified, were changed to time-date!committer version |
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg index 5eb994c6fe0..2e3e4f21cda 100755 --- a/build-aux/git-hooks/commit-msg +++ b/build-aux/git-hooks/commit-msg | |||
| @@ -87,8 +87,8 @@ exec $awk ' | |||
| 87 | status = 1 | 87 | status = 1 |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | 72 < length && $0 ~ space { | 90 | 78 < length && $0 ~ space { |
| 91 | print "Line longer than 72 characters in commit message" | 91 | print "Line longer than 78 characters in commit message" |
| 92 | status = 1 | 92 | status = 1 |
| 93 | } | 93 | } |
| 94 | 94 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5829ec2fae5..a13cd142780 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,39 @@ | |||
| 1 | 2014-12-27 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp-sh.el (tramp-send-command-and-read): New optional | ||
| 4 | arg MARKER. | ||
| 5 | (tramp-get-remote-path): Use it. | ||
| 6 | |||
| 7 | 2014-12-27 Michael Albinus <michael.albinus@gmx.de> | ||
| 8 | |||
| 9 | * net/tramp.el (tramp-error-with-buffer): Call `message' properly. | ||
| 10 | (tramp-accept-process-output): Use nil as argument for | ||
| 11 | `accept-process-output', when there is a gateway prepended. | ||
| 12 | |||
| 13 | * net/tramp-gw.el (tramp-gw-open-connection): Suppress traces in | ||
| 14 | wrong debug buffer. | ||
| 15 | (tramp-gw-open-connection): Set process coding system 'binary. | ||
| 16 | (tramp-gw-open-network-stream): Handle HTTP error 403. | ||
| 17 | |||
| 18 | * net/tramp-sh.el (tramp-compute-multi-hops): Suppress traces in | ||
| 19 | wrong debug buffer. | ||
| 20 | (tramp-maybe-open-connection): Set connection property "gateway". | ||
| 21 | |||
| 22 | 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 23 | |||
| 24 | * subr.el (sit-for): Tweak docstring (bug#19381). | ||
| 25 | |||
| 26 | 2014-12-27 Dmitry Gutov <dgutov@yandex.ru> | ||
| 27 | |||
| 28 | * vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date' | ||
| 29 | stage to after `diff-index' (bug#19386). | ||
| 30 | |||
| 31 | 2014-12-27 João Távora <joaotavora@gmail.com> | ||
| 32 | |||
| 33 | * textmodes/tex-mode.el (tex-insert-quote): Consider and respect | ||
| 34 | `electric-pair-mode' (bug#19356). | ||
| 35 | |||
| 36 | 2014-12-27 Michael Albinus <michael.albinus@gmx.de> | ||
| 1 | 2014-12-27 Dmitry Gutov <dgutov@yandex.ru> | 37 | 2014-12-27 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 38 | ||
| 3 | elisp-xref-find: Don't create buffers eagerly. | 39 | elisp-xref-find: Don't create buffers eagerly. |
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 0decd8847cc..e21aaf78914 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el | |||
| @@ -195,11 +195,12 @@ instead of the host name declared in TARGET-VEC." | |||
| 195 | (setq tramp-gw-gw-proc | 195 | (setq tramp-gw-gw-proc |
| 196 | (funcall | 196 | (funcall |
| 197 | socks-function | 197 | socks-function |
| 198 | (tramp-get-connection-name gw-vec) | 198 | (let ((tramp-verbose 0)) (tramp-get-connection-name gw-vec)) |
| 199 | (tramp-get-connection-buffer gw-vec) | 199 | (let ((tramp-verbose 0)) (tramp-get-connection-buffer gw-vec)) |
| 200 | (tramp-file-name-real-host target-vec) | 200 | (tramp-file-name-real-host target-vec) |
| 201 | (tramp-file-name-port target-vec))) | 201 | (tramp-file-name-port target-vec))) |
| 202 | (set-process-sentinel tramp-gw-gw-proc 'tramp-gw-gw-proc-sentinel) | 202 | (set-process-sentinel tramp-gw-gw-proc 'tramp-gw-gw-proc-sentinel) |
| 203 | (set-process-coding-system tramp-gw-gw-proc 'binary 'binary) | ||
| 203 | (tramp-compat-set-process-query-on-exit-flag tramp-gw-gw-proc nil) | 204 | (tramp-compat-set-process-query-on-exit-flag tramp-gw-gw-proc nil) |
| 204 | (tramp-message | 205 | (tramp-message |
| 205 | vec 4 "Opened %s process `%s'" | 206 | vec 4 "Opened %s process `%s'" |
| @@ -260,6 +261,10 @@ authentication is requested from proxy server, provide it." | |||
| 260 | (200 (setq found t)) | 261 | (200 (setq found t)) |
| 261 | ;; We need basic authentication. | 262 | ;; We need basic authentication. |
| 262 | (401 (setq authentication (tramp-gw-basic-authentication nil first))) | 263 | (401 (setq authentication (tramp-gw-basic-authentication nil first))) |
| 264 | ;; Access forbidden. | ||
| 265 | (403 (tramp-error-with-buffer | ||
| 266 | (current-buffer) tramp-gw-vector 'file-error | ||
| 267 | "Connection to %s:%d forbidden." host service)) | ||
| 263 | ;; Target host not found. | 268 | ;; Target host not found. |
| 264 | (404 (tramp-error-with-buffer | 269 | (404 (tramp-error-with-buffer |
| 265 | (current-buffer) tramp-gw-vector 'file-error | 270 | (current-buffer) tramp-gw-vector 'file-error |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ba7b7d95a4b..2e2e2ac3698 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2883,7 +2883,7 @@ the result will be a local, non-Tramp, file name." | |||
| 2883 | (name1 name) | 2883 | (name1 name) |
| 2884 | (i 0) | 2884 | (i 0) |
| 2885 | ;; We do not want to raise an error when | 2885 | ;; We do not want to raise an error when |
| 2886 | ;; `start-file-process' has been started several time in | 2886 | ;; `start-file-process' has been started several times in |
| 2887 | ;; `eshell' and friends. | 2887 | ;; `eshell' and friends. |
| 2888 | (tramp-current-connection nil)) | 2888 | (tramp-current-connection nil)) |
| 2889 | 2889 | ||
| @@ -4510,7 +4510,8 @@ Gateway hops are already opened." | |||
| 4510 | ;; Therefore, we must remember the gateway vector. But we | 4510 | ;; Therefore, we must remember the gateway vector. But we |
| 4511 | ;; cannot do it as connection property, because it shouldn't | 4511 | ;; cannot do it as connection property, because it shouldn't |
| 4512 | ;; be persistent. And we have no started process yet either. | 4512 | ;; be persistent. And we have no started process yet either. |
| 4513 | (tramp-set-file-property (car target-alist) "" "gateway" hop))) | 4513 | (let ((tramp-verbose 0)) |
| 4514 | (tramp-set-file-property (car target-alist) "" "gateway" hop)))) | ||
| 4514 | 4515 | ||
| 4515 | ;; Foreign and out-of-band methods are not supported for multi-hops. | 4516 | ;; Foreign and out-of-band methods are not supported for multi-hops. |
| 4516 | (when (cdr target-alist) | 4517 | (when (cdr target-alist) |
| @@ -4687,7 +4688,8 @@ connection if a previous connection has died for some reason." | |||
| 4687 | l-method 'tramp-connection-timeout)) | 4688 | l-method 'tramp-connection-timeout)) |
| 4688 | (gw-args | 4689 | (gw-args |
| 4689 | (tramp-get-method-parameter l-method 'tramp-gw-args)) | 4690 | (tramp-get-method-parameter l-method 'tramp-gw-args)) |
| 4690 | (gw (tramp-get-file-property hop "" "gateway" nil)) | 4691 | (gw (let ((tramp-verbose 0)) |
| 4692 | (tramp-get-file-property hop "" "gateway" nil))) | ||
| 4691 | (g-method (and gw (tramp-file-name-method gw))) | 4693 | (g-method (and gw (tramp-file-name-method gw))) |
| 4692 | (g-user (and gw (tramp-file-name-user gw))) | 4694 | (g-user (and gw (tramp-file-name-user gw))) |
| 4693 | (g-host (and gw (tramp-file-name-real-host gw))) | 4695 | (g-host (and gw (tramp-file-name-real-host gw))) |
| @@ -4715,8 +4717,10 @@ connection if a previous connection has died for some reason." | |||
| 4715 | (setq login-args (append async-args login-args))) | 4717 | (setq login-args (append async-args login-args))) |
| 4716 | 4718 | ||
| 4717 | ;; Add gateway arguments if necessary. | 4719 | ;; Add gateway arguments if necessary. |
| 4718 | (when (and gw gw-args) | 4720 | (when gw |
| 4719 | (setq login-args (append gw-args login-args))) | 4721 | (tramp-set-connection-property p "gateway" t) |
| 4722 | (when gw-args | ||
| 4723 | (setq login-args (append gw-args login-args)))) | ||
| 4720 | 4724 | ||
| 4721 | ;; Check for port number. Until now, there's no | 4725 | ;; Check for port number. Until now, there's no |
| 4722 | ;; need for handling like method, user, host. | 4726 | ;; need for handling like method, user, host. |
| @@ -4902,8 +4906,9 @@ FMT and ARGS which are passed to `error'." | |||
| 4902 | (or (tramp-send-command-and-check vec command) | 4906 | (or (tramp-send-command-and-check vec command) |
| 4903 | (apply 'tramp-error vec 'file-error fmt args))) | 4907 | (apply 'tramp-error vec 'file-error fmt args))) |
| 4904 | 4908 | ||
| 4905 | (defun tramp-send-command-and-read (vec command &optional noerror) | 4909 | (defun tramp-send-command-and-read (vec command &optional noerror marker) |
| 4906 | "Run COMMAND and return the output, which must be a Lisp expression. | 4910 | "Run COMMAND and return the output, which must be a Lisp expression. |
| 4911 | If MARKER is a regexp, read the output after that string. | ||
| 4907 | In case there is no valid Lisp expression and NOERROR is nil, it | 4912 | In case there is no valid Lisp expression and NOERROR is nil, it |
| 4908 | raises an error." | 4913 | raises an error." |
| 4909 | (when (if noerror | 4914 | (when (if noerror |
| @@ -4911,8 +4916,17 @@ raises an error." | |||
| 4911 | (tramp-barf-unless-okay | 4916 | (tramp-barf-unless-okay |
| 4912 | vec command "`%s' returns with error" command)) | 4917 | vec command "`%s' returns with error" command)) |
| 4913 | (with-current-buffer (tramp-get-connection-buffer vec) | 4918 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 4914 | ;; Read the expression. | ||
| 4915 | (goto-char (point-min)) | 4919 | (goto-char (point-min)) |
| 4920 | ;; Read the marker. | ||
| 4921 | (when (stringp marker) | ||
| 4922 | (condition-case nil | ||
| 4923 | (re-search-forward marker) | ||
| 4924 | (error (unless noerror | ||
| 4925 | (tramp-error | ||
| 4926 | vec 'file-error | ||
| 4927 | "`%s' does not return the marker `%s': `%s'" | ||
| 4928 | command marker (buffer-string)))))) | ||
| 4929 | ;; Read the expression. | ||
| 4916 | (condition-case nil | 4930 | (condition-case nil |
| 4917 | (prog1 (read (current-buffer)) | 4931 | (prog1 (read (current-buffer)) |
| 4918 | ;; Error handling. | 4932 | ;; Error handling. |
| @@ -5064,25 +5078,22 @@ Return ATTR." | |||
| 5064 | "/bin:/usr/bin") | 5078 | "/bin:/usr/bin") |
| 5065 | "/bin:/usr/bin")))) | 5079 | "/bin:/usr/bin")))) |
| 5066 | (own-remote-path | 5080 | (own-remote-path |
| 5067 | ;; We cannot apply `tramp-send-command-and-read' because | 5081 | ;; The login shell could return more than just the $PATH |
| 5068 | ;; the login shell could return more than just the $PATH | 5082 | ;; string. So we use `tramp-end-of-heredoc' as marker. |
| 5069 | ;; string. So we emulate that function. | ||
| 5070 | (when elt2 | 5083 | (when elt2 |
| 5071 | (tramp-send-command | 5084 | (tramp-send-command-and-read |
| 5072 | vec | 5085 | vec |
| 5073 | (format | 5086 | (format |
| 5074 | "%s -l %s 'echo \\\"$PATH\\\"'" | 5087 | "%s -l %s 'echo %s \\\"$PATH\\\"'" |
| 5075 | (tramp-get-method-parameter | 5088 | (tramp-get-method-parameter |
| 5076 | (tramp-file-name-method vec) 'tramp-remote-shell) | 5089 | (tramp-file-name-method vec) 'tramp-remote-shell) |
| 5077 | (mapconcat | 5090 | (mapconcat |
| 5078 | 'identity | 5091 | 'identity |
| 5079 | (tramp-get-method-parameter | 5092 | (tramp-get-method-parameter |
| 5080 | (tramp-file-name-method vec) 'tramp-remote-shell-args) | 5093 | (tramp-file-name-method vec) 'tramp-remote-shell-args) |
| 5081 | " "))) | 5094 | " ") |
| 5082 | (with-current-buffer (tramp-get-connection-buffer vec) | 5095 | (tramp-shell-quote-argument tramp-end-of-heredoc)) |
| 5083 | (goto-char (point-max)) | 5096 | nil (regexp-quote tramp-end-of-heredoc))))) |
| 5084 | (forward-line -1) | ||
| 5085 | (read (current-buffer)))))) | ||
| 5086 | 5097 | ||
| 5087 | ;; Replace place holder `tramp-default-remote-path'. | 5098 | ;; Replace place holder `tramp-default-remote-path'. |
| 5088 | (when elt1 | 5099 | (when elt1 |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2cf9d45b965..7aba7494672 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1610,7 +1610,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." | |||
| 1610 | (let ((enable-recursive-minibuffers t)) | 1610 | (let ((enable-recursive-minibuffers t)) |
| 1611 | ;; `tramp-error' does not show messages. So we must do it | 1611 | ;; `tramp-error' does not show messages. So we must do it |
| 1612 | ;; ourselves. | 1612 | ;; ourselves. |
| 1613 | (message fmt-string arguments) | 1613 | (apply 'message fmt-string arguments) |
| 1614 | ;; Show buffer. | 1614 | ;; Show buffer. |
| 1615 | (pop-to-buffer buf) | 1615 | (pop-to-buffer buf) |
| 1616 | (discard-input) | 1616 | (discard-input) |
| @@ -3609,15 +3609,19 @@ connection buffer." | |||
| 3609 | This is needed in order to hide `last-coding-system-used', which is set | 3609 | This is needed in order to hide `last-coding-system-used', which is set |
| 3610 | for process communication also." | 3610 | for process communication also." |
| 3611 | (with-current-buffer (process-buffer proc) | 3611 | (with-current-buffer (process-buffer proc) |
| 3612 | (tramp-message proc 10 "%s %s" proc (process-status proc)) | 3612 | ;; FIXME: If there is a gateway process, we need communication |
| 3613 | (let (buffer-read-only last-coding-system-used) | 3613 | ;; between several processes. Too complicate to implement, so we |
| 3614 | ;; read output from all proceeses. | ||
| 3615 | (let ((p (if (tramp-get-connection-property proc "gateway" nil) nil proc)) | ||
| 3616 | buffer-read-only last-coding-system-used) | ||
| 3614 | ;; Under Windows XP, accept-process-output doesn't return | 3617 | ;; Under Windows XP, accept-process-output doesn't return |
| 3615 | ;; sometimes. So we add an additional timeout. | 3618 | ;; sometimes. So we add an additional timeout. |
| 3616 | (with-timeout ((or timeout 1)) | 3619 | (with-timeout ((or timeout 1)) |
| 3617 | (if (featurep 'xemacs) | 3620 | (if (featurep 'xemacs) |
| 3618 | (accept-process-output proc timeout timeout-msecs) | 3621 | (accept-process-output p timeout timeout-msecs) |
| 3619 | (accept-process-output proc timeout timeout-msecs (and proc t))))) | 3622 | (accept-process-output p timeout timeout-msecs (and proc t)))) |
| 3620 | (tramp-message proc 10 "\n%s" (buffer-string)))) | 3623 | (tramp-message proc 10 "%s %s %s\n%s" |
| 3624 | proc (process-status proc) p (buffer-string))))) | ||
| 3621 | 3625 | ||
| 3622 | (defun tramp-check-for-regexp (proc regexp) | 3626 | (defun tramp-check-for-regexp (proc regexp) |
| 3623 | "Check, whether REGEXP is contained in process buffer of PROC. | 3627 | "Check, whether REGEXP is contained in process buffer of PROC. |
diff --git a/lisp/subr.el b/lisp/subr.el index 6ce02b79a0a..53ad2729a10 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2166,7 +2166,7 @@ keyboard-quit events while waiting for a valid input." | |||
| 2166 | char)) | 2166 | char)) |
| 2167 | 2167 | ||
| 2168 | (defun sit-for (seconds &optional nodisp obsolete) | 2168 | (defun sit-for (seconds &optional nodisp obsolete) |
| 2169 | "Perform redisplay, then wait for SECONDS seconds or until input is available. | 2169 | "Redisplay, then wait for SECONDS seconds. Stop when input is available. |
| 2170 | SECONDS may be a floating-point value. | 2170 | SECONDS may be a floating-point value. |
| 2171 | \(On operating systems that do not support waiting for fractions of a | 2171 | \(On operating systems that do not support waiting for fractions of a |
| 2172 | second, floating-point values are rounded down to the nearest integer.) | 2172 | second, floating-point values are rounded down to the nearest integer.) |
| @@ -2184,7 +2184,7 @@ floating point support." | |||
| 2184 | (declare (advertised-calling-convention (seconds &optional nodisp) "22.1")) | 2184 | (declare (advertised-calling-convention (seconds &optional nodisp) "22.1")) |
| 2185 | ;; This used to be implemented in C until the following discussion: | 2185 | ;; This used to be implemented in C until the following discussion: |
| 2186 | ;; http://lists.gnu.org/archive/html/emacs-devel/2006-07/msg00401.html | 2186 | ;; http://lists.gnu.org/archive/html/emacs-devel/2006-07/msg00401.html |
| 2187 | ;; Then it was moved to C using an implementation based on an idle timer, | 2187 | ;; Then it was moved here using an implementation based on an idle timer, |
| 2188 | ;; which was then replaced by the use of read-event. | 2188 | ;; which was then replaced by the use of read-event. |
| 2189 | (if (numberp nodisp) | 2189 | (if (numberp nodisp) |
| 2190 | (setq seconds (+ seconds (* 1e-3 nodisp)) | 2190 | (setq seconds (+ seconds (* 1e-3 nodisp)) |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 1993ff104f4..d54c78b683a 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1300,18 +1300,48 @@ Inserts the value of `tex-open-quote' (normally ``) or `tex-close-quote' | |||
| 1300 | \(normally '') depending on the context. With prefix argument, always | 1300 | \(normally '') depending on the context. With prefix argument, always |
| 1301 | inserts \" characters." | 1301 | inserts \" characters." |
| 1302 | (interactive "*P") | 1302 | (interactive "*P") |
| 1303 | ;; Discover if we'll be inserting normal double quotes. | ||
| 1304 | ;; | ||
| 1303 | (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\)) | 1305 | (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\)) |
| 1304 | (eq (get-text-property (point) 'face) 'tex-verbatim) | 1306 | (eq (get-text-property (point) 'face) 'tex-verbatim) |
| 1305 | (save-excursion | 1307 | ;; Discover if a preceding occurance of `tex-open-quote' |
| 1306 | (backward-char (length tex-open-quote)) | 1308 | ;; should be morphed to a normal double quote. |
| 1307 | (when (or (looking-at (regexp-quote tex-open-quote)) | 1309 | ;; |
| 1308 | (looking-at (regexp-quote tex-close-quote))) | 1310 | (and (>= (point) (+ (point-min) (length tex-open-quote))) |
| 1309 | (delete-char (length tex-open-quote)) | 1311 | (save-excursion |
| 1310 | t))) | 1312 | (backward-char (length tex-open-quote)) |
| 1313 | (when (or (looking-at (regexp-quote tex-open-quote)) | ||
| 1314 | (looking-at (regexp-quote tex-close-quote))) | ||
| 1315 | (delete-char (length tex-open-quote)) | ||
| 1316 | (when (looking-at (regexp-quote tex-close-quote)) | ||
| 1317 | (delete-char (length tex-close-quote))) | ||
| 1318 | t)))) | ||
| 1319 | ;; Insert the normal quote (eventually letting | ||
| 1320 | ;; `electric-pair-mode' do its thing). | ||
| 1321 | ;; | ||
| 1311 | (self-insert-command (prefix-numeric-value arg)) | 1322 | (self-insert-command (prefix-numeric-value arg)) |
| 1312 | (insert (if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) | 1323 | ;; We'll be inserting fancy TeX quotes, but consider and imitate |
| 1313 | (memq (preceding-char) '(?~))) | 1324 | ;; `electric-pair-mode''s two behaviours: pair-insertion and |
| 1314 | tex-open-quote tex-close-quote)))) | 1325 | ;; region wrapping. |
| 1326 | ;; | ||
| 1327 | (if (and electric-pair-mode (use-region-p)) | ||
| 1328 | (let* ((saved (point-marker))) | ||
| 1329 | (goto-char (mark)) | ||
| 1330 | (insert (if (> saved (mark)) tex-open-quote tex-close-quote)) | ||
| 1331 | (goto-char saved) | ||
| 1332 | (insert (if (> saved (mark)) tex-close-quote tex-open-quote))) | ||
| 1333 | (if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) | ||
| 1334 | (memq (preceding-char) '(?~))) | ||
| 1335 | (if electric-pair-mode | ||
| 1336 | (if (looking-at (regexp-quote tex-close-quote)) | ||
| 1337 | (forward-char (length tex-close-quote)) | ||
| 1338 | (insert tex-open-quote) | ||
| 1339 | (insert tex-close-quote) | ||
| 1340 | (backward-char (length tex-close-quote))) | ||
| 1341 | (insert tex-open-quote)) | ||
| 1342 | (if (looking-at (regexp-quote tex-close-quote)) | ||
| 1343 | (forward-char (length tex-close-quote)) | ||
| 1344 | (insert tex-close-quote)))))) | ||
| 1315 | 1345 | ||
| 1316 | (defun tex-validate-buffer () | 1346 | (defun tex-validate-buffer () |
| 1317 | "Check current buffer for paragraphs containing mismatched braces or $s. | 1347 | "Check current buffer for paragraphs containing mismatched braces or $s. |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 65f683c7808..1700bef10b0 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -371,8 +371,7 @@ or an empty string if none." | |||
| 371 | (goto-char (point-min)) | 371 | (goto-char (point-min)) |
| 372 | (pcase stage | 372 | (pcase stage |
| 373 | (`update-index | 373 | (`update-index |
| 374 | (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added | 374 | (setq next-stage (if (vc-git--empty-db-p) 'ls-files-added 'diff-index))) |
| 375 | (if files 'ls-files-up-to-date 'diff-index)))) | ||
| 376 | (`ls-files-added | 375 | (`ls-files-added |
| 377 | (setq next-stage 'ls-files-unknown) | 376 | (setq next-stage 'ls-files-unknown) |
| 378 | (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) | 377 | (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) |
| @@ -381,7 +380,7 @@ or an empty string if none." | |||
| 381 | (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) | 380 | (push (list name 'added (vc-git-create-extra-fileinfo 0 new-perm)) |
| 382 | result)))) | 381 | result)))) |
| 383 | (`ls-files-up-to-date | 382 | (`ls-files-up-to-date |
| 384 | (setq next-stage 'diff-index) | 383 | (setq next-stage 'ls-files-unknown) |
| 385 | (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) | 384 | (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t) |
| 386 | (let ((perm (string-to-number (match-string 1) 8)) | 385 | (let ((perm (string-to-number (match-string 1) 8)) |
| 387 | (name (match-string 2))) | 386 | (name (match-string 2))) |
| @@ -400,7 +399,7 @@ or an empty string if none." | |||
| 400 | (vc-git-create-extra-fileinfo 0 0)) | 399 | (vc-git-create-extra-fileinfo 0 0)) |
| 401 | result))) | 400 | result))) |
| 402 | (`diff-index | 401 | (`diff-index |
| 403 | (setq next-stage 'ls-files-unknown) | 402 | (setq next-stage (if files 'ls-files-up-to-date 'ls-files-unknown)) |
| 404 | (while (re-search-forward | 403 | (while (re-search-forward |
| 405 | ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0" | 404 | ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0" |
| 406 | nil t 1) | 405 | nil t 1) |
diff --git a/src/ChangeLog b/src/ChangeLog index e8428abc926..8e72ddbf9c4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring. | ||
| 4 | |||
| 5 | 2014-12-27 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 7 | * gnutls.c (gnutls_init): Fix deprecation warning from GCC. | ||
| 8 | |||
| 9 | 2014-12-27 Eli Zaretskii <eliz@gnu.org> | ||
| 10 | |||
| 1 | 2014-12-26 Paul Eggert <eggert@cs.ucla.edu> | 11 | 2014-12-26 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 12 | ||
| 3 | Use bool for boolean in xselect.c, xsettings.c | 13 | Use bool for boolean in xselect.c, xsettings.c |
| @@ -918,6 +928,8 @@ | |||
| 918 | * fileio.c (Fexpand_file_name): Use make_unibyte_string, not | 928 | * fileio.c (Fexpand_file_name): Use make_unibyte_string, not |
| 919 | build_string, when importing a home directory. (Bug#18873) | 929 | build_string, when importing a home directory. (Bug#18873) |
| 920 | 930 | ||
| 931 | 2014-12-27 Eli Zaretskii <eliz@gnu.org> | ||
| 932 | |||
| 921 | * dispnew.c (buffer_posn_from_coords): | 933 | * dispnew.c (buffer_posn_from_coords): |
| 922 | Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to | 934 | Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to |
| 923 | account for the header-line height. (Bug#18839) | 935 | account for the header-line height. (Bug#18839) |
diff --git a/src/buffer.c b/src/buffer.c index b57d968e73a..9a5c4a8824f 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -6066,9 +6066,9 @@ from happening repeatedly and making Emacs nonfunctional. */); | |||
| 6066 | doc: /* List of functions to call after each text change. | 6066 | doc: /* List of functions to call after each text change. |
| 6067 | Three arguments are passed to each function: the positions of | 6067 | Three arguments are passed to each function: the positions of |
| 6068 | the beginning and end of the range of changed text, | 6068 | the beginning and end of the range of changed text, |
| 6069 | and the length in bytes of the pre-change text replaced by that range. | 6069 | and the length in chars of the pre-change text replaced by that range. |
| 6070 | \(For an insertion, the pre-change length is zero; | 6070 | \(For an insertion, the pre-change length is zero; |
| 6071 | for a deletion, that length is the number of bytes deleted, | 6071 | for a deletion, that length is the number of chars deleted, |
| 6072 | and the post-change beginning and end are at the same place.) | 6072 | and the post-change beginning and end are at the same place.) |
| 6073 | 6073 | ||
| 6074 | Buffer changes made while executing the `after-change-functions' | 6074 | Buffer changes made while executing the `after-change-functions' |
diff --git a/src/gnutls.c b/src/gnutls.c index bf9f1323546..14205ca0d3a 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -134,7 +134,7 @@ DEF_GNUTLS_FN (void, gnutls_global_set_mem_functions, | |||
| 134 | gnutls_is_secure_function, gnutls_realloc_function, | 134 | gnutls_is_secure_function, gnutls_realloc_function, |
| 135 | gnutls_free_function)); | 135 | gnutls_free_function)); |
| 136 | DEF_GNUTLS_FN (int, gnutls_handshake, (gnutls_session_t)); | 136 | DEF_GNUTLS_FN (int, gnutls_handshake, (gnutls_session_t)); |
| 137 | DEF_GNUTLS_FN (int, gnutls_init, (gnutls_session_t *, gnutls_connection_end_t)); | 137 | DEF_GNUTLS_FN (int, gnutls_init, (gnutls_session_t *, unsigned int)); |
| 138 | DEF_GNUTLS_FN (int, gnutls_priority_set_direct, | 138 | DEF_GNUTLS_FN (int, gnutls_priority_set_direct, |
| 139 | (gnutls_session_t, const char *, const char **)); | 139 | (gnutls_session_t, const char *, const char **)); |
| 140 | DEF_GNUTLS_FN (size_t, gnutls_record_check_pending, (gnutls_session_t)); | 140 | DEF_GNUTLS_FN (size_t, gnutls_record_check_pending, (gnutls_session_t)); |
diff --git a/test/ChangeLog b/test/ChangeLog index fda30d9237c..4e59ee0afbf 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2014-12-27 João Távora <joaotavora@gmail.com> | ||
| 2 | |||
| 3 | * automated/electric-tests.el (autowrapping-7): Tests for | ||
| 4 | tex-mode. | ||
| 5 | |||
| 6 | 2014-12-27 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * automated/flymake/warnpred/test.pl: Tweak format, since the | ||
| 9 | previous one seems to have stopped giving a warning with perl 5.20.1. | ||
| 10 | |||
| 11 | 2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 1 | 2014-12-26 Fabián Ezequiel Gallina <fgallina@gnu.org> | 12 | 2014-12-26 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 13 | ||
| 3 | * automated/python-tests.el (python-shell-get-process-name-1) | 14 | * automated/python-tests.el (python-shell-get-process-name-1) |
diff --git a/test/automated/data/flymake/test.pl b/test/automated/data/flymake/test.pl index 2013b2e4434..d5abcb47e7f 100644 --- a/test/automated/data/flymake/test.pl +++ b/test/automated/data/flymake/test.pl | |||
| @@ -1,2 +1,2 @@ | |||
| 1 | @arr = [1,2,3,4]; | 1 | @arr = [1,2,3,4]; |
| 2 | @arr[1] = -1; | 2 | my $b = @arr[1]; |
diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el index b1908e6bb32..cd07213bf20 100644 --- a/test/automated/electric-tests.el +++ b/test/automated/electric-tests.el | |||
| @@ -60,7 +60,7 @@ | |||
| 60 | (cl-progv | 60 | (cl-progv |
| 61 | (mapcar #'car bindings) | 61 | (mapcar #'car bindings) |
| 62 | (mapcar #'cdr bindings) | 62 | (mapcar #'cdr bindings) |
| 63 | (self-insert-command 1)))) | 63 | (call-interactively (key-binding `[,last-command-event]))))) |
| 64 | (should (equal (buffer-substring-no-properties (point-min) (point-max)) | 64 | (should (equal (buffer-substring-no-properties (point-min) (point-max)) |
| 65 | expected-string)) | 65 | expected-string)) |
| 66 | (should (equal (point) | 66 | (should (equal (point) |
| @@ -575,5 +575,14 @@ baz\"\"" | |||
| 575 | (skip-chars-backward "\"") | 575 | (skip-chars-backward "\"") |
| 576 | (mark-sexp -1))) | 576 | (mark-sexp -1))) |
| 577 | 577 | ||
| 578 | (define-electric-pair-test autowrapping-7 | ||
| 579 | "foo" "\"" :expected-string "``foo''" :expected-point 8 | ||
| 580 | :modes '(tex-mode) | ||
| 581 | :fixture-fn #'(lambda () | ||
| 582 | (electric-pair-mode 1) | ||
| 583 | (goto-char (point-max)) | ||
| 584 | (skip-chars-backward "\"") | ||
| 585 | (mark-sexp -1))) | ||
| 586 | |||
| 578 | (provide 'electric-tests) | 587 | (provide 'electric-tests) |
| 579 | ;;; electric-tests.el ends here | 588 | ;;; electric-tests.el ends here |