changeset 108408:3a905f16bc97

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 03 Feb 2010 12:21:41 +0000
parents 955ed37b44ca (current diff) 59d8f3cc91f4 (diff)
children 75f6177a785f
files
diffstat 14 files changed, 104 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/doc/emacs/ChangeLog	Mon Feb 01 14:11:30 2010 +0000
+++ b/doc/emacs/ChangeLog	Wed Feb 03 12:21:41 2010 +0000
@@ -1,3 +1,9 @@
+2010-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* display.texi (Useless Whitespace, Text Display):
+	* custom.texi (Init Examples): Avoid obsolete special default variables
+	like default-major-mode.
+
 2010-01-24  Mark A. Hershberger  <mah@everybody.org>
 
 	* programs.texi (Other C Commands): Replace reference to obsolete
--- a/doc/emacs/custom.texi	Mon Feb 01 14:11:30 2010 +0000
+++ b/doc/emacs/custom.texi	Wed Feb 03 12:21:41 2010 +0000
@@ -2275,7 +2275,7 @@
 Make Text mode the default mode for new buffers.
 
 @example
-(setq default-major-mode 'text-mode)
+(setq-default major-mode 'text-mode)
 @end example
 
 Note that @code{text-mode} is used because it is the command for
--- a/doc/emacs/display.texi	Mon Feb 01 14:11:30 2010 +0000
+++ b/doc/emacs/display.texi	Wed Feb 03 12:21:41 2010 +0000
@@ -877,7 +877,6 @@
 @key{RET}}.  This command does not remove newline characters.
 
 @vindex indicate-empty-lines
-@vindex default-indicate-empty-lines
 @cindex unused lines
 @cindex fringes, and unused line indication
   Emacs can indicate unused lines at the end of the window with a
@@ -887,11 +886,11 @@
 this image in the fringe.
 
   To enable this feature, set the buffer-local variable
-@code{indicate-empty-lines} to a non-@code{nil} value.  The default
-value of this variable is controlled by the variable
-@code{default-indicate-empty-lines}; by setting that variable, you
-can enable or disable this feature for all new buffers.  (This feature
-currently doesn't work on text-only terminals.)
+@code{indicate-empty-lines} to a non-@code{nil} value.  You can enable
+or disable this feature for all new buffers by setting the default
+value of this variable, e.g.@: @code{(setq-default
+indicate-empty-lines t)};.  (This feature currently doesn't work on
+text-only terminals.)
 
 @node Selective Display
 @section Selective Display
@@ -1083,17 +1082,15 @@
 printing characters (octal codes above 0400).
 
 @vindex tab-width
-@vindex default-tab-width
   Some @acronym{ASCII} control characters are displayed in special
 ways.  The newline character (octal code 012) is displayed by starting
 a new line.  The tab character (octal code 011) is displayed by moving
 to the next tab stop column (normally every 8 columns).  The number of
 spaces per tab is controlled by the variable @code{tab-width}, which
 must have an integer value between 1 and 1000, inclusive, and is made
-local by changing it.  Note that how the tab character in the buffer
+buffer-local by changing it.  Note that how the tab character in the buffer
 is displayed has nothing to do with the definition of @key{TAB} as a
-command.  The variable @code{default-tab-width} controls the default
-value of this variable for buffers where you have not set it locally.
+command.
 
   Other @acronym{ASCII} control characters are normally displayed as a caret
 (@samp{^}) followed by the non-control version of the character; thus,
--- a/doc/lispintro/ChangeLog	Mon Feb 01 14:11:30 2010 +0000
+++ b/doc/lispintro/ChangeLog	Wed Feb 03 12:21:41 2010 +0000
@@ -1,3 +1,8 @@
+2010-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp-intro.texi (Text and Auto-fill, Mode Line):
+	Avoid obsolete special default variables like default-major-mode.
+
 2009-12-09  David Robinow  <drobinow@gmail.com>  (tiny change)
 
 	* makefile.w32-in: Use parenthesis for macros for nmake
--- a/doc/lispintro/emacs-lisp-intro.texi	Mon Feb 01 14:11:30 2010 +0000
+++ b/doc/lispintro/emacs-lisp-intro.texi	Wed Feb 03 12:21:41 2010 +0000
@@ -17346,10 +17346,10 @@
 @smallexample
 @group
 ;;; Text mode and Auto Fill mode
-; The next two lines put Emacs into Text mode
-; and Auto Fill mode, and are for writers who
-; want to start writing prose rather than code.
-(setq default-major-mode 'text-mode)
+;; The next two lines put Emacs into Text mode
+;; and Auto Fill mode, and are for writers who
+;; want to start writing prose rather than code.
+(setq-default major-mode 'text-mode)
 (add-hook 'text-mode-hook 'turn-on-auto-fill)
 @end group
 @end smallexample
@@ -18257,7 +18257,7 @@
 @need 1700
 @node Mode Line,  , Miscellaneous, Emacs Initialization
 @section A Modified Mode Line
-@vindex default-mode-line-format
+@vindex mode-line-format
 @cindex Mode line format
 
 Finally, a feature I really like: a modified mode line.
@@ -18282,7 +18282,7 @@
 @group
 ;; Set a Mode Line that tells me which machine, which directory,
 ;; and which line I am on, plus the other customary information.
-(setq default-mode-line-format
+(setq-default mode-line-format
  (quote
   (#("-" 0 1
      (help-echo
--- a/doc/lispref/ChangeLog	Mon Feb 01 14:11:30 2010 +0000
+++ b/doc/lispref/ChangeLog	Wed Feb 03 12:21:41 2010 +0000
@@ -1,3 +1,8 @@
+2010-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* display.texi (Line Height): Avoid obsolete special default variables
+	like default-major-mode.
+
 2010-01-28  Alan Mackenzie  <acm@muc.de>
 
 	* display.texi (Auto Faces): Say fontification-functions is called
--- a/doc/lispref/display.texi	Mon Feb 01 14:11:30 2010 +0000
+++ b/doc/lispref/display.texi	Wed Feb 03 12:21:41 2010 +0000
@@ -1768,7 +1768,6 @@
 There are several ways to specify the line spacing for different
 parts of Emacs text.
 
-@vindex default-line-spacing
   On graphical terminals, you can specify the line spacing for all
 lines in a frame, using the @code{line-spacing} frame parameter
 (@pxref{Layout Parameters}).  However, if the default value of
--- a/lisp/ChangeLog	Mon Feb 01 14:11:30 2010 +0000
+++ b/lisp/ChangeLog	Wed Feb 03 12:21:41 2010 +0000
@@ -1,3 +1,42 @@
+2010-02-03  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/ange-ftp.el (ange-ftp-insert-directory): Parse directory
+	also in case of (and (not full) (not wildcard)). This is needed,
+	when dired is called with a list of files, which are not in
+	`default-directory'.  (Bug#5478)
+
+2010-02-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* vc-hooks.el (vc-path): Make it an obsolete var, rather than function.
+
+2010-02-02  Juri Linkov  <juri@jurta.org>
+
+	* textmodes/ispell.el (ispell-message-text-end): Remove final newline
+	from unidiff to allow function-line after @@.
+
+2010-02-02  Juri Linkov  <juri@jurta.org>
+
+	* ediff-util.el (ediff-file-checked-in-p): Replace '(nil CVS) by
+	'(RCS SCCS) with inverted condition.
+
+2010-02-02  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/ange-ftp.el (ange-ftp-skip-msgs): Ignore all ""^500 .*AUTH"
+	messages.
+
+2010-02-01  Juri Linkov  <juri@jurta.org>
+
+	* arc-mode.el (archive-zip-extract): Use `member-ignore-case' to
+	compare with "pkunzip" and "pkzip" instead of only "pkzip".
+	In the `archive-extract-by-stdout' branch use `shell-quote-argument'
+	only when (car archive-zip-extract) is "unzip".  (Bug#5475)
+
+2010-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* doc-view.el (doc-view-new-window-function): Be a bit more defensive.
+	(doc-view-revert-buffer): New command.
+	(doc-view-mode-map): Use it.
+
 2010-02-01  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* vc-bzr.el (vc-bzr-dir-extra-headers): Add a header when a
--- a/lisp/arc-mode.el	Mon Feb 01 14:11:30 2010 +0000
+++ b/lisp/arc-mode.el	Wed Feb 03 12:21:41 2010 +0000
@@ -1782,12 +1782,16 @@
     (apply 'vector (nreverse files))))
 
 (defun archive-zip-extract (archive name)
-  (if (equal (car archive-zip-extract) "pkzip")
+  (if (member-ignore-case (car archive-zip-extract) '("pkunzip" "pkzip"))
       (archive-*-extract archive name archive-zip-extract)
-    ;; unzip expands wildcards in NAME, so we need to quote it.
-    ;; FIXME: Does pkzip need similar treatment?
-    (archive-extract-by-stdout archive (shell-quote-argument name)
-			       archive-zip-extract)))
+    (archive-extract-by-stdout
+     archive
+     ;; unzip expands wildcards in NAME, so we need to quote it.
+     ;; FIXME: Does pkunzip need similar treatment?
+     (if (equal (car archive-zip-extract) "unzip")
+	 (shell-quote-argument name)
+       name)
+     archive-zip-extract)))
 
 (defun archive-zip-write-file-member (archive descr)
   (archive-*-write-file-member
--- a/lisp/doc-view.el	Mon Feb 01 14:11:30 2010 +0000
+++ b/lisp/doc-view.el	Wed Feb 03 12:21:41 2010 +0000
@@ -235,8 +235,15 @@
 
 (defun doc-view-new-window-function (winprops)
   (let ((ol (image-mode-window-get 'overlay winprops)))
+    (when (and ol (not (overlay-buffer ol)))
+      ;; I've seen `ol' be a dead overlay.  I do not yet know how this
+      ;; happened, so maybe the bug is elsewhere, but in the mean time,
+      ;; this seems like a safe approach.
+      (setq ol nil))
     (if ol
-        (setq ol (copy-overlay ol))
+        (progn
+          (assert (eq (overlay-buffer ol) (current-buffer)))
+          (setq ol (copy-overlay ol)))
       (assert (not (get-char-property (point-min) 'display)))
       (setq ol (make-overlay (point-min) (point-max) nil t))
       (overlay-put ol 'doc-view t))
@@ -323,12 +330,21 @@
     (define-key map (kbd "C-c C-c")   'doc-view-toggle-display)
     ;; Open a new buffer with doc's text contents
     (define-key map (kbd "C-c C-t")   'doc-view-open-text)
-    ;; Reconvert the current document
-    (define-key map (kbd "g")         'revert-buffer)
-    (define-key map (kbd "r")         'revert-buffer)
+    ;; Reconvert the current document.  Don't just use revert-buffer
+    ;; because that resets the scale factor, the page number, ...
+    (define-key map (kbd "g")         'doc-view-revert-buffer)
+    (define-key map (kbd "r")         'doc-view-revert-buffer)
     map)
   "Keymap used by `doc-view-mode' when displaying a doc as a set of images.")
 
+(defun doc-view-revert-buffer (&optional ignore-auto noconfirm)
+  "Like `revert-buffer', but preserves the buffer's current modes."
+  ;; FIXME: this should probably be moved to files.el and used for
+  ;; most/all "g" bindings to revert-buffer.
+  (interactive (list (not current-prefix-arg)))
+  (revert-buffer ignore-auto noconfirm 'preserve-modes))
+
+
 (easy-menu-define doc-view-menu doc-view-mode-map
   "Menu for Doc View mode."
   '("DocView"
--- a/lisp/ediff-util.el	Mon Feb 01 14:11:30 2010 +0000
+++ b/lisp/ediff-util.el	Wed Feb 03 12:21:41 2010 +0000
@@ -1126,8 +1126,8 @@
 
 (defun ediff-file-checked-in-p (file)
   (and (featurep 'vc-hooks)
-       ;; CVS files are considered not checked in
-       (not (memq (vc-backend file) '(nil CVS)))
+       ;; Only RCS and SCCS files are considered checked in
+       (memq (vc-backend file) '(RCS SCCS))
        (if (fboundp 'vc-state)
 	   (and
 	    (not (memq (vc-state file) '(edited needs-merge)))
--- a/lisp/net/ange-ftp.el	Mon Feb 01 14:11:30 2010 +0000
+++ b/lisp/net/ange-ftp.el	Wed Feb 03 12:21:41 2010 +0000
@@ -720,7 +720,7 @@
 	  "^Connected \\|^$\\|^Remote system\\|^Using\\|^ \\|Password:\\|"
 	  "^Data connection \\|"
 	  "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|"
-          "^500 .*AUTH \\(KERBEROS\\|GSSAPI\\)\\|^KERBEROS\\|"
+          "^500 .*AUTH\\|^KERBEROS\\|"
 	  "^530 Please login with USER and PASS\\|" ; non kerberised vsFTPd
 	  "^534 Kerberos Authentication not enabled\\|"
 	  "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT")
@@ -4534,7 +4534,7 @@
          ;; Remove "d" which dired added to `switches'.
          (setq switches (substring switches 0 (match-beginning 0))))
        (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".")
-                                    switches nil))
+                                    switches 'parse))
               (filename (file-name-nondirectory (directory-file-name file)))
               (case-fold-search nil))
          ;; FIXME: This presumes a particular output format, which is
--- a/lisp/textmodes/ispell.el	Mon Feb 01 14:11:30 2010 +0000
+++ b/lisp/textmodes/ispell.el	Wed Feb 03 12:21:41 2010 +0000
@@ -3459,7 +3459,7 @@
 	       ;; Matches context difference listing
 	       "\\(\\(^cd .*\n\\)?diff -c .*\\)?\n\\*\\*\\* .*\n--- .*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*"
 	       ;; Matches unidiff difference listing
-	       "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+ [-+][0-9]+,[0-9]+ @@\n"
+	       "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+ [-+][0-9]+,[0-9]+ @@"
 	       ;; Matches reporter.el bug report
 	       "^current state:\n==============\n"
 	       ;; Matches commonly used "cut" boundaries
--- a/lisp/vc-hooks.el	Mon Feb 01 14:11:30 2010 +0000
+++ b/lisp/vc-hooks.el	Wed Feb 03 12:21:41 2010 +0000
@@ -89,7 +89,7 @@
   :type '(repeat directory)
   :group 'vc)
 
-(make-obsolete 'vc-path "should not be necessary anymore." "23.2")
+(make-obsolete-variable 'vc-path "should not be necessary anymore." "23.2")
 
 (defcustom vc-make-backup-files nil
   "If non-nil, backups of registered files are made as with other files.