changeset 107264:79ebcc02de4c

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Thu, 28 Jan 2010 22:03:25 +0000
parents 978bba88d79c (current diff) 645e3632318a (diff)
children d4daa9776b2a
files
diffstat 11 files changed, 100 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/doc/lispref/ChangeLog	Thu Jan 28 08:58:10 2010 +0000
+++ b/doc/lispref/ChangeLog	Thu Jan 28 22:03:25 2010 +0000
@@ -1,3 +1,8 @@
+2010-01-28  Alan Mackenzie  <acm@muc.de>
+
+	* display.texi (Auto Faces): Say fontification-functions is called
+	whether or not Font Lock is enabled.  Tidy up the wording a bit.
+
 2010-01-17  Chong Yidong  <cyd@stupidchicken.com>
 
 	* elisp.texi: Remove duplicate edition information (Bug#5407).
--- a/doc/lispref/display.texi	Thu Jan 28 08:58:10 2010 +0000
+++ b/doc/lispref/display.texi	Thu Jan 28 22:03:25 2010 +0000
@@ -2654,23 +2654,25 @@
 
 @defvar fontification-functions
 This variable holds a list of functions that are called by Emacs
-redisplay as needed to assign faces automatically to text in the buffer.
+redisplay as needed, just before doing redisplay.  They are called even
+when Font Lock Mode isn't enabled.  When Font Lock Mode is enabled, this
+variable usually holds just one function, @code{jit-lock-function}.
 
 The functions are called in the order listed, with one argument, a
-buffer position @var{pos}.  Each function should attempt to assign faces
-to the text in the current buffer starting at @var{pos}.
-
-Each function should record the faces they assign by setting the
-@code{face} property.  It should also add a non-@code{nil}
-@code{fontified} property for all the text it has assigned faces to.
+buffer position @var{pos}.  Collectively they should attempt to assign
+faces to the text in the current buffer starting at @var{pos}.
+
+The functions should record the faces they assign by setting the
+@code{face} property.  They should also add a non-@code{nil}
+@code{fontified} property to all the text they have assigned faces to.
 That property tells redisplay that faces have been assigned to that text
 already.
 
-It is probably a good idea for each function to do nothing if the
+It is probably a good idea for the functions to do nothing if the
 character after @var{pos} already has a non-@code{nil} @code{fontified}
 property, but this is not required.  If one function overrides the
-assignments made by a previous one, the properties as they are
-after the last function finishes are the ones that really matter.
+assignments made by a previous one, the properties after the last
+function finishes are the ones that really matter.
 
 For efficiency, we recommend writing these functions so that they
 usually assign faces to around 400 to 600 characters at each call.
--- a/lisp/ChangeLog	Thu Jan 28 08:58:10 2010 +0000
+++ b/lisp/ChangeLog	Thu Jan 28 22:03:25 2010 +0000
@@ -1,3 +1,25 @@
+2010-01-28  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/ange-ftp.el (ange-ftp-insert-directory): Handle the case,
+	FILENAME is not in `default-directory'.  (Bug#5478)
+
+	* net/tramp.el (tramp-handle-insert-directory): Simplify handling
+	of SWITCHES.  Handle the case, FILENAME is not in
+	`default-directory'.  (Bug#5478)
+	(tramp-register-file-name-handlers): Add safe-magic property.
+
+2010-01-28  Chong Yidong  <cyd@stupidchicken.com>
+
+	* arc-mode.el (archive-zip-extract): Quote the argument passed to
+	unzip (Bug#5475).
+
+2010-01-28  Nil Geisweiller  <ngeiswei@googlemail.com>  (tiny change)
+
+	* progmodes/flymake.el (flymake-allowed-file-name-masks)
+	(flymake-master-make-header-init): Add other C++ filename masks.
+	(flymake-find-possible-master-files)
+	(flymake-check-patch-master-file-buffer): Doc fixes (Bug#5488).
+
 2010-01-28  Michael Albinus  <michael.albinus@gmx.de>
 
 	Fix some busybox annoyances.
--- a/lisp/arc-mode.el	Thu Jan 28 08:58:10 2010 +0000
+++ b/lisp/arc-mode.el	Thu Jan 28 22:03:25 2010 +0000
@@ -1784,7 +1784,10 @@
 (defun archive-zip-extract (archive name)
   (if (equal (car archive-zip-extract) "pkzip")
       (archive-*-extract archive name archive-zip-extract)
-    (archive-extract-by-stdout 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)))
 
 (defun archive-zip-write-file-member (archive descr)
   (archive-*-write-file-member
--- a/lisp/net/ange-ftp.el	Thu Jan 28 08:58:10 2010 +0000
+++ b/lisp/net/ange-ftp.el	Thu Jan 28 22:03:25 2010 +0000
@@ -4542,7 +4542,18 @@
          (if (string-match (concat "^.+[^ ] " (regexp-quote filename)
                                    "\\( -> .*\\)?[@/*=]?\n") dirlist)
              (match-string 0 dirlist)
-           "")))))))
+           "")))))
+
+    ;; The inserted file could be from somewhere else.
+    (when (and (not wildcard) (not full)
+	       (search-backward
+		(if (zerop (length (file-name-nondirectory
+				    (expand-file-name file))))
+		    "."
+		  (file-name-nondirectory file))
+		nil 'noerror))
+      (replace-match (file-relative-name (expand-file-name file)) t)
+      (goto-char (point-max)))))
 
 (defun ange-ftp-dired-uncache (dir)
   (if (ange-ftp-ftp-name (expand-file-name dir))
--- a/lisp/net/tramp.el	Thu Jan 28 08:58:10 2010 +0000
+++ b/lisp/net/tramp.el	Thu Jan 28 22:03:25 2010 +0000
@@ -4062,26 +4062,25 @@
 	     (not (symbol-value 'ls-lisp-use-insert-directory-program)))
 	(tramp-run-real-handler
 	 'insert-directory (list filename switches wildcard full-directory-p))
-      (when (and (string-match "^--dired\\s-+" switches)
+      (when (stringp switches)
+        (setq switches (split-string switches)))
+      (when (and (member "--dired" switches)
 		 (not (tramp-get-ls-command-with-dired v)))
-	(setq switches (replace-match "" nil t switches)))
-      (tramp-message
-       v 4 "Inserting directory `ls %s %s', wildcard %s, fulldir %s"
-       switches filename (if wildcard "yes" "no")
-       (if full-directory-p "yes" "no"))
+	(setq switches (delete "--dired" switches)))
       (when wildcard
         (setq wildcard (tramp-run-real-handler
 			'file-name-nondirectory (list localname)))
         (setq localname (tramp-run-real-handler
 			 'file-name-directory (list localname))))
-      (when (listp switches)
-        (setq switches (mapconcat 'identity switches " ")))
       (unless full-directory-p
-        (setq switches (concat "-d " switches)))
+        (setq switches (add-to-list 'switches "-d" 'append)))
+      (setq switches (mapconcat 'tramp-shell-quote-argument switches " "))
       (when wildcard
-        (setq switches (concat switches " " wildcard)))
-      (when (string-match "'" switches)
-	(setq switches (replace-match "\\\\'" nil nil switches)))
+	(setq switches (concat switches " " wildcard)))
+      (tramp-message
+       v 4 "Inserting directory `ls %s %s', wildcard %s, fulldir %s"
+       switches filename (if wildcard "yes" "no")
+       (if full-directory-p "yes" "no"))
       ;; If `full-directory-p', we just say `ls -l FILENAME'.
       ;; Else we chdir to the parent directory, then say `ls -ld BASENAME'.
       (if full-directory-p
@@ -4144,6 +4143,17 @@
 	(while (looking-at "//")
 	  (forward-line 1)
 	  (delete-region (match-beginning 0) (point)))
+
+	;; The inserted file could be from somewhere else.
+	(when (and (not wildcard) (not full-directory-p))
+	  (goto-char (point-max))
+	  (search-backward
+	   (if (zerop (length (file-name-nondirectory filename)))
+	       "."
+	     (file-name-nondirectory filename))
+	   beg 'noerror)
+	  (replace-match (file-relative-name filename) t))
+
 	(goto-char (point-max))))))
 
 (defun tramp-handle-unhandled-file-name-directory (filename)
@@ -5481,6 +5491,7 @@
   ;; Add the handlers.
   (add-to-list 'file-name-handler-alist
 	       (cons tramp-file-name-regexp 'tramp-file-name-handler))
+  (put 'tramp-file-name-handler 'safe-magic t)
   (add-to-list 'file-name-handler-alist
 	       (cons tramp-completion-file-name-regexp
 		     'tramp-completion-file-name-handler))
--- a/lisp/progmodes/flymake.el	Thu Jan 28 08:58:10 2010 +0000
+++ b/lisp/progmodes/flymake.el	Thu Jan 28 22:03:25 2010 +0000
@@ -269,8 +269,7 @@
   :group 'tools)
 
 (defcustom flymake-allowed-file-name-masks
-  '(("\\.c\\'" flymake-simple-make-init)
-    ("\\.cpp\\'" flymake-simple-make-init)
+  '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init)
     ("\\.xml\\'" flymake-xml-init)
     ("\\.html?\\'" flymake-xml-init)
     ("\\.cs\\'" flymake-simple-make-init)
@@ -291,7 +290,7 @@
     ;; ("[ \t]*\\input[ \t]*{\\(.*\\)\\(%s\\)}" 1 2 ))
     ;; ("\\.tex\\'" 1)
     )
-  "*Files syntax checking is allowed for."
+  "Files syntax checking is allowed for."
   :group 'flymake
   :type '(repeat (string symbol symbol symbol)))
 
@@ -384,7 +383,7 @@
 
 (defun flymake-find-possible-master-files (file-name master-file-dirs masks)
   "Find (by name and location) all possible master files.
-Master files are .cpp and .c for and .h.  Files are searched for
+Master files include .cpp and .c for .h.  Files are searched for
 starting from the .h directory and max max-level parent dirs.
 File contents are not checked."
   (let* ((dirs master-file-dirs)
@@ -434,9 +433,11 @@
         source-file-name patched-source-file-name
         include-dirs regexp)
   "Check if MASTER-FILE-NAME is a master file for SOURCE-FILE-NAME.
-For .cpp master file this means it includes SOURCE-FILE-NAME (.h).
 If yes, patch a copy of MASTER-FILE-NAME to include PATCHED-SOURCE-FILE-NAME
 instead of SOURCE-FILE-NAME.
+
+For example, foo.cpp is a master file if it includes foo.h.
+
 Whether a buffer for MATER-FILE-NAME exists, use it as a source
 instead of reading master file from disk."
   (let* ((source-file-nondir (file-name-nondirectory source-file-name))
@@ -1700,9 +1701,10 @@
 
 ;;;; .h/make specific
 (defun flymake-master-make-header-init ()
-  (flymake-master-make-init 'flymake-get-include-dirs
-			    '("\\.cpp\\'" "\\.c\\'")
-			    "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\""))
+  (flymake-master-make-init
+   'flymake-get-include-dirs
+   '("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'")
+   "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\""))
 
 ;;;; .java/make specific
 (defun flymake-simple-make-java-init ()
--- a/src/ChangeLog	Thu Jan 28 08:58:10 2010 +0000
+++ b/src/ChangeLog	Thu Jan 28 22:03:25 2010 +0000
@@ -1,3 +1,11 @@
+2010-01-28  Chong Yidong  <cyd@stupidchicken.com>
+
+	* fileio.c (Frename_file): Fix last change (Bug#5487).
+
+	* m/mips.h: Remove DATA_START.  Suggested by Dan Nicolaescu.
+
+	* m/alpha.h: Don't define DATA_START on NetBSD (Bug#4629).
+
 2010-01-28  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xfns.c (Fx_create_frame): Remove window size matching code from
@@ -7,7 +15,7 @@
 2010-01-27  Jason Rumney  <jasonr@gnu.org>
 
 	* w32inevt.c (w32_kbd_patch_key): Save the unicode character.
-	(key_event): Use unicode for characters 128 and higher.
+	(key_event): Use unicode for characters 128 and higher (Bug#4567).
 
 2010-01-27  Kenichi Handa  <handa@m17n.org>
 
--- a/src/fileio.c	Thu Jan 28 08:58:10 2010 +0000
+++ b/src/fileio.c	Thu Jan 28 22:03:25 2010 +0000
@@ -2289,7 +2289,7 @@
                                  NILP (ok_if_already_exists) ? Qnil : Qt);
           else
 #endif
-	  if (Ffile_directory_p (file))
+	  if (!NILP (Ffile_directory_p (file)))
 	    call4 (Qcopy_directory, file, newname, Qt, Qnil);
 	  else
 	    /* We have already prompted if it was an integer, so don't
@@ -2300,7 +2300,7 @@
 
 	  count = SPECPDL_INDEX ();
 	  specbind (Qdelete_by_moving_to_trash, Qnil);
-	  if (Ffile_directory_p (file))
+	  if (!NILP (Ffile_directory_p (file)))
 	    call2 (Qdelete_directory, file, Qt);
 	  else
 	    Fdelete_file (file);
--- a/src/m/alpha.h	Thu Jan 28 08:58:10 2010 +0000
+++ b/src/m/alpha.h	Thu Jan 28 22:03:25 2010 +0000
@@ -95,7 +95,7 @@
 
 #undef UNEXEC
 #define UNEXEC unexelf.o
-#ifndef GNU_LINUX
+#if !defined(GNU_LINUX) && !defined(__NetBSD__)
 #define DATA_START    0x140000000
 #endif
 
--- a/src/m/mips.h	Thu Jan 28 08:58:10 2010 +0000
+++ b/src/m/mips.h	Thu Jan 28 22:03:25 2010 +0000
@@ -50,10 +50,6 @@
 
 #define TEXT_START      0x00400000
 
-#ifndef GNU_LINUX
-#define DATA_START      0x10000000
-#endif
-
 
 #if 0 /* These definitions were advantageous when not using
 	 USE_LSB_TAG.  With that, they get ignored but cause errors.  */