# HG changeset patch # User Katsumi Yamaoka # Date 1273531437 0 # Node ID e05d1f835527dbce08dae69676658b7672015a71 # Parent 5e0883e3a3b7d93e7e003f082e16e80a556cf966# Parent daa05d3ccff4545b769c6b15cb4f1579c8bb82a8 Merge from mainline. diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/ChangeLog --- a/lisp/ChangeLog Mon May 10 07:25:27 2010 +0000 +++ b/lisp/ChangeLog Mon May 10 22:43:57 2010 +0000 @@ -1,13 +1,40 @@ +2010-05-10 Juri Linkov + + Remove nodes visited during Isearch from the Info history. + * info.el (Info-isearch-initial-history) + (Info-isearch-initial-history-list): New variables. + (Info-isearch-start): Record initial values of + Info-isearch-initial-history and Info-isearch-initial-history-list. + Add Info-isearch-end to isearch-mode-end-hook. + (Info-isearch-end): New function. + +2010-05-10 Michael Albinus + + * net/tramp.el (tramp-do-file-attributes-with-stat): Add space in + format string, in order to work around a bug in pdksh. Reported + by Gilles Pion . + (tramp-handle-verify-visited-file-modtime): Do not send a command + when the connection is not established. + (tramp-handle-set-file-times): Simplify the check for utc. + +2010-05-10 Juanma Barranquero + + Fix use of `filter-buffer-substring' (rework previous change). + * emulation/cua-base.el (cua--filter-buffer-noprops): New function. + (cua-repeat-replace-region): + * emulation/cua-rect.el (cua--extract-rectangle, cua-incr-rectangle): + * emulation/cua-gmrk.el (cua-copy-region-to-global-mark) + (cua-cut-region-to-global-mark): Use it. + 2010-05-09 Michael R. Mauger - * progmodes/sql.el: Version 2.1 - (sql-product-alist): Redesigned structure of product info. - (sql-product, sql-user, sql-server, sql-database): Safe - variables. + * progmodes/sql.el: Version 2.1. + (sql-product-alist): Redesign structure of product info. + (sql-product, sql-user, sql-server, sql-database): Safe variables. (sql-port, sql-port-history): New variables. (sql-interactive-product): New variable. (sql-send-terminator): New variable. - (sql-imenu-generic-expression): Added "Types" imenu entry. + (sql-imenu-generic-expression): Add "Types" imenu entry. (sql-oracle-login-params, sql-sqlite-login-params) (sql-mysql-login-params, sql-solid-login-params) (sql-sybase-login-params, sql-informix-login-params) @@ -15,10 +42,9 @@ (sql-postgres-login-params, sql-interbase-login-params) (sql-db2-login-params, sql-linter-login-params) (sql-oracle-scan-on): New variables. - (sql-mode-map): Added C-c C-i to start interactive mode. - (sql-mode-menu): Updated existing menu entries. - (sql-font-lock-keywords-builder): Compile-time font-lock - optimization. + (sql-mode-map): Add C-c C-i to start interactive mode. + (sql-mode-menu): Update existing menu entries. + (sql-font-lock-keywords-builder): Compile-time font-lock optimization. (sql-mode-oracle-font-lock-keywords) (sql-mode-postgres-font-lock-keywords) (sql-mode-ms-font-lock-keywords) @@ -30,7 +56,7 @@ (sql-mode-mysql-font-lock-keywords) (sql-mode-sqlite-font-lock-keywords) (sql-mode-db2-font-lock-keywords) - (sql-mode-linter-font-lock-keywords): Updated initialization to + (sql-mode-linter-font-lock-keywords): Update initialization to reduce run-time complexity. (sql-add-product, sql-del-product): New functions. (sql-set-product-feature, sql-get-product-feature): New functions. @@ -39,12 +65,12 @@ (sql-highlight-product): Update product API. (sql-help-list-products): New function. (sql-help): Dynamically lists free and non-free products. - (sql-get-login): Corrected bug in handling history and added + (sql-get-login): Correct bug in handling history and added prompt for port. (sql-copy-column): Copy without properties. (sqli-input-sender): Apply filters to SQLi input. - (sql-query-placeholders-and-send): Obey `sql-oracle-scan-on' - setting. Implement as a filter. + (sql-query-placeholders-and-send): Obey `sql-oracle-scan-on' setting. + Implement as a filter. (sql-escape-newlines-filter): Implement as a filter. (sql-remove-tabs-filter): New function. (sql-send-magic-terminator): New function. @@ -59,8 +85,8 @@ (sql-connect-oracle, sql-connect-sybase, sql-connect-informix) (sql-connect-sqlite, sql-connect-mysql, sql-connect-solid) (sql-connect-ingres, sql-connect-ms, sql-connect-postgres) - (sql-connect-interbase, sql-connect-db2, sql-connect-linter): Use - `sql-connect'. + (sql-connect-interbase, sql-connect-db2, sql-connect-linter): + Use `sql-connect'. 2010-05-09 Stefan Monnier @@ -109,7 +135,7 @@ 2010-05-08 Chong Yidong - * international/mule.el (auto-coding-alist): Only purecopy + * international/mule.el (auto-coding-alist): Only purecopy car of each item, not the whole list (Bug#6083). 2010-05-08 Chong Yidong @@ -122,7 +148,7 @@ * composite.el (compose-region, reference-point-alist): Fix typos in the doc strings. -2010-05-08 Alexander Klimov (tiny change) +2010-05-08 Alexander Klimov (tiny change) * calc/calc-graph.el (calc-graph-plot): Use the proper form for gnuplot's "set" command. @@ -211,7 +237,7 @@ * Version 23.2 released. 2010-05-07 Deniz Dogan (tiny change) - Stefan Monnier + Stefan Monnier Highlight vendor specific properties. * textmodes/css-mode.el (css-proprietary-nmstart-re): New var. @@ -974,7 +1000,7 @@ (calc-hyperbolic): Add "Option" to message, as appropriate. (calc-option, calc-is-option): New functions. - * calc-help.el (calc-full-help): Add `calc-option-help'. + * calc-help.el (calc-full-help): Add `calc-option-help'. (calc-option-prefix-help): New function. * calc-misc.el (calc-help): Add "Option" entry. diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/emulation/cua-base.el --- a/lisp/emulation/cua-base.el Mon May 10 07:25:27 2010 +0000 +++ b/lisp/emulation/cua-base.el Mon May 10 22:43:57 2010 +0000 @@ -780,6 +780,10 @@ (setq mark-active nil) (run-hooks 'deactivate-mark-hook))) +(defun cua--filter-buffer-noprops (start end) + (let ((str (filter-buffer-substring start end))) + (set-text-properties 0 (length str) nil str) + str)) ;; The current register prefix (defvar cua--register nil) @@ -1039,10 +1043,7 @@ (setq s (car u)) (setq s (car u) e (cdr u))))))) (cond ((and s e (<= s e) (= s (mark t))) - (setq cua--repeat-replace-text - (filter-buffer-substring s e)) - (set-text-properties 0 (length cua--repeat-replace-text) - nil cua--repeat-replace-text)) + (setq cua--repeat-replace-text (cua--filter-buffer-noprops s e))) ((and (null s) (eq u elt)) ;; nothing inserted (setq cua--repeat-replace-text "")) diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/emulation/cua-gmrk.el --- a/lisp/emulation/cua-gmrk.el Mon May 10 07:25:27 2010 +0000 +++ b/lisp/emulation/cua-gmrk.el Mon May 10 22:43:57 2010 +0000 @@ -137,9 +137,8 @@ (let ((src-buf (current-buffer))) (save-excursion (if (equal (marker-buffer cua--global-mark-marker) src-buf) - (let ((text (filter-buffer-substring start end))) + (let ((text (cua--filter-buffer-noprops start end))) (goto-char (marker-position cua--global-mark-marker)) - (set-text-properties 0 (length text) text) (insert text)) (set-buffer (marker-buffer cua--global-mark-marker)) (goto-char (marker-position cua--global-mark-marker)) @@ -162,11 +161,10 @@ (if (and (< start (marker-position cua--global-mark-marker)) (< (marker-position cua--global-mark-marker) end)) (message "Can't move region into itself") - (let ((text (filter-buffer-substring start end)) + (let ((text (cua--filter-buffer-noprops start end)) (p1 (copy-marker start)) (p2 (copy-marker end))) (goto-char (marker-position cua--global-mark-marker)) - (set-text-properties 0 (length text) text) (insert text) (cua--activate-global-mark) (delete-region (marker-position p1) (marker-position p2)) diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/emulation/cua-rect.el --- a/lisp/emulation/cua-rect.el Mon May 10 07:25:27 2010 +0000 +++ b/lisp/emulation/cua-rect.el Mon May 10 22:43:57 2010 +0000 @@ -625,7 +625,7 @@ (if (not (cua--rectangle-virtual-edges)) (cua--rectangle-operation nil nil nil nil nil ; do not tabify '(lambda (s e l r) - (setq rect (cons (filter-buffer-substring s e nil t) rect)))) + (setq rect (cons (cua--filter-buffer-noprops s e) rect)))) (cua--rectangle-operation nil 1 nil nil nil ; do not tabify '(lambda (s e l r v) (let ((copy t) (bs 0) (as 0) row) @@ -643,7 +643,7 @@ (setq as (- r (max (current-column) l)) e (point))) (setq row (if (and copy (> e s)) - (filter-buffer-substring s e nil t) + (cua--filter-buffer-noprops s e) "")) (when (> bs 0) (setq row (concat (make-string bs ?\s) row))) @@ -1124,12 +1124,12 @@ '(lambda (s e l r) (cond ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t) - (let* ((txt (filter-buffer-substring (match-beginning 1) (match-end 1) nil t)) + (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) (n (string-to-number txt 16)) (fmt (format "0x%%0%dx" (length txt)))) (replace-match (format fmt (+ n increment))))) ((re-search-forward "\\( *-?[0-9]+\\)" e t) - (let* ((txt (filter-buffer-substring (match-beginning 1) (match-end 1) nil t)) + (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) (prefix (if (= (aref txt 0) ?0) "0" "")) (n (string-to-number txt 10)) (fmt (format "%%%s%dd" prefix (length txt)))) diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Mon May 10 07:25:27 2010 +0000 +++ b/lisp/gnus/ChangeLog Mon May 10 22:43:57 2010 +0000 @@ -1,3 +1,13 @@ +2010-05-10 Katsumi Yamaoka + + * mm-util.el (mm-emacs-mule): Remove. + +2010-05-10 Andreas Seltenreich + + * gnus-sum.el (gnus-summary-mode): Don't make minor-mode-alist + buffer-local as it's incompatible with Stefan Monnier's 2010-05-03 + change. + 2010-05-10 Katsumi Yamaoka * mm-util.el (mm-with-unibyte-current-buffer): Redefine it so as not to diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/gnus/gnus-sum.el --- a/lisp/gnus/gnus-sum.el Mon May 10 07:25:27 2010 +0000 +++ b/lisp/gnus/gnus-sum.el Mon May 10 22:43:57 2010 +0000 @@ -3056,7 +3056,6 @@ (gnus-simplify-mode-line) (setq major-mode 'gnus-summary-mode) (setq mode-name "Summary") - (make-local-variable 'minor-mode-alist) (use-local-map gnus-summary-mode-map) (buffer-disable-undo) (setq buffer-read-only t ;Disable modification diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/gnus/mm-util.el --- a/lisp/gnus/mm-util.el Mon May 10 07:25:27 2010 +0000 +++ b/lisp/gnus/mm-util.el Mon May 10 22:43:57 2010 +0000 @@ -902,12 +902,6 @@ out))) (eval-and-compile - (defvar mm-emacs-mule (and (not (featurep 'xemacs)) - (boundp 'enable-multibyte-characters) - (default-value 'enable-multibyte-characters) - (fboundp 'set-buffer-multibyte)) - "True in Emacs with Mule.") - (if (featurep 'xemacs) (defalias 'mm-enable-multibyte 'ignore) (defun mm-enable-multibyte () diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/info.el --- a/lisp/info.el Mon May 10 07:25:27 2010 +0000 +++ b/lisp/info.el Mon May 10 22:43:57 2010 +0000 @@ -266,6 +266,8 @@ :group 'info) (defvar Info-isearch-initial-node nil) +(defvar Info-isearch-initial-history nil) +(defvar Info-isearch-initial-history-list nil) (defcustom Info-mode-hook ;; Try to obey obsolete Info-fontify settings. @@ -1914,7 +1916,27 @@ (setq Info-isearch-initial-node ;; Don't stop at initial node for nonincremental search. ;; Otherwise this variable is set after first search failure. - (and isearch-nonincremental Info-current-node))) + (and isearch-nonincremental Info-current-node)) + (setq Info-isearch-initial-history Info-history + Info-isearch-initial-history-list Info-history-list) + (add-hook 'isearch-mode-end-hook 'Info-isearch-end nil t)) + +(defun Info-isearch-end () + ;; Remove intermediate nodes (visited while searching) + ;; from the history. Add only the last node (where Isearch ended). + (if (> (length Info-history) + (length Info-isearch-initial-history)) + (setq Info-history + (nthcdr (- (length Info-history) + (length Info-isearch-initial-history) + 1) + Info-history))) + (if (> (length Info-history-list) + (length Info-isearch-initial-history-list)) + (setq Info-history-list + (cons (car Info-history-list) + Info-isearch-initial-history-list))) + (remove-hook 'isearch-mode-end-hook 'Info-isearch-end t)) (defun Info-isearch-filter (beg-found found) "Test whether the current search hit is a visible useful text. diff -r 5e0883e3a3b7 -r e05d1f835527 lisp/net/tramp.el --- a/lisp/net/tramp.el Mon May 10 07:25:27 2010 +0000 +++ b/lisp/net/tramp.el Mon May 10 22:43:57 2010 +0000 @@ -2867,7 +2867,9 @@ (tramp-send-command-and-read vec (format - "((%s %s || %s -h %s) && %s -c '((\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)" + ;; On Opsware, pdksh (which is the true name of ksh there) doesn't + ;; parse correctly the sequence "((". Therefore, we add a space. + "( (%s %s || %s -h %s) && %s -c '( (\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)" (tramp-get-file-exists-command vec) (tramp-shell-quote-argument localname) (tramp-get-test-command vec) @@ -2920,12 +2922,14 @@ function directly, unless those two cases are already taken care of." (with-current-buffer buf - ;; There is no file visiting the buffer, or the buffer has no - ;; recorded last modification time. - (if (or (not (buffer-file-name)) - (eq (visited-file-modtime) 0)) - t - (let ((f (buffer-file-name))) + (let ((f (buffer-file-name))) + ;; There is no file visiting the buffer, or the buffer has no + ;; recorded last modification time, or there is no established + ;; connection. + (if (or (not f) + (eq (visited-file-modtime) 0) + (not (tramp-file-name-handler 'file-remote-p f nil 'connected))) + t (with-parsed-tramp-file-name f nil (tramp-flush-file-property v localname) (let* ((attr (file-attributes f)) @@ -2984,16 +2988,11 @@ (let ((time (if (or (null time) (equal time '(0 0))) (current-time) time)) - (utc - ;; With GNU Emacs, `format-time-string' has an - ;; optional parameter UNIVERSAL. This is preferred, - ;; because we could handle the case when the remote - ;; host is located in a different time zone as the - ;; local host. - (and (functionp 'subr-arity) - (subrp (symbol-function 'format-time-string)) - (= 3 (cdr (tramp-compat-funcall - 'subr-arity 'format-time-string)))))) + ;; With GNU Emacs, `format-time-string' has an optional + ;; parameter UNIVERSAL. This is preferred, because we + ;; could handle the case when the remote host is + ;; located in a different time zone as the local host. + (utc (not (featurep 'xemacs)))) (tramp-send-command-and-check v (format "%s touch -t %s %s" (if utc "TZ=UTC; export TZ;" "") diff -r 5e0883e3a3b7 -r e05d1f835527 src/ChangeLog --- a/src/ChangeLog Mon May 10 07:25:27 2010 +0000 +++ b/src/ChangeLog Mon May 10 22:43:57 2010 +0000 @@ -1,3 +1,9 @@ +2010-05-10 Eli Zaretskii + + * xdisp.c (init_iterator): Don't turn on bidi reordering in + unibyte buffers. See + http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html. + 2010-05-10 Glenn Morris * Makefile.in (LIBS_SYSTEM): Set using configure, not cpp. diff -r 5e0883e3a3b7 -r e05d1f835527 src/xdisp.c --- a/src/xdisp.c Mon May 10 07:25:27 2010 +0000 +++ b/src/xdisp.c Mon May 10 22:43:57 2010 +0000 @@ -2698,8 +2698,12 @@ /* Are multibyte characters enabled in current_buffer? */ it->multibyte_p = !NILP (current_buffer->enable_multibyte_characters); - /* Do we need to reorder bidirectional text? */ - it->bidi_p = !NILP (current_buffer->bidi_display_reordering); + /* Do we need to reorder bidirectional text? Not if this is a + unibyte buffer: all single-byte characters are by definition + strong L2R, so no reordering is needed. And bidi.c doesn't + support unibyte buffers anyway. */ + it->bidi_p + = !NILP (current_buffer->bidi_display_reordering) && it->multibyte_p; /* Non-zero if we should highlight the region. */ highlight_region_p