changeset 108502:9914f26982b7

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Tue, 11 May 2010 22:45:13 +0000
parents a5ca1d2d9889 (current diff) ffe7f17f895f (diff)
children 4cbfe951ec9e
files
diffstat 8 files changed, 67 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue May 11 06:12:46 2010 +0000
+++ b/lisp/ChangeLog	Tue May 11 22:45:13 2010 +0000
@@ -1,3 +1,23 @@
+2010-05-11  Juanma Barranquero  <lekktu@gmail.com>
+
+	* dirtrack.el (dirtrackp): Remove defcustom; don't make automatically
+	buffer-local (it's an obsolete alias for `dirtrack-mode') (bug#6173).
+
+2010-05-11  Juri Linkov  <juri@jurta.org>
+
+	* scroll-all.el (scroll-all-check-to-scroll):
+	Add `scroll-up-command' and `scroll-down-command' (bug#6164).
+
+2010-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* iimage.el (iimage-mode-map): Move initialization into declaration.
+	(iimage-mode-buffer): Use with-silent-modifications.
+	Simplify calling convention.  Adjust callers.
+	(iimage-mode): Don't run hook redundantly.
+
+	* minibuffer.el (completion-pcm--pattern->regex):
+	Fix last change (bug#6160).
+
 2010-05-10  Juri Linkov  <juri@jurta.org>
 
 	Remove nodes visited during Isearch from the Info history.
@@ -11,8 +31,8 @@
 2010-05-10  Michael Albinus  <michael.albinus@gmx.de>
 
 	* 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 <gpion@lfdj.com>.
+	format string, in order to work around a bug in pdksh.
+	Reported by Gilles Pion <gpion@lfdj.com>.
 	(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.
@@ -795,6 +815,8 @@
 
 2010-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	Make the log-edit comments use RFC822 format throughout.
+
 	* vc.el (vc-checkin, vc-modify-change-comment):
 	Adjust to new vc-start/finish-logentry.
 	(vc-find-conflicted-file): New command.
--- a/lisp/dirtrack.el	Tue May 11 06:12:46 2010 +0000
+++ b/lisp/dirtrack.el	Tue May 11 22:45:13 2010 +0000
@@ -143,13 +143,6 @@
   :group 'dirtrack
   :type  'string)
 
-(defcustom dirtrackp t
-  "If non-nil, directory tracking via `dirtrack' is enabled."
-  :group 'dirtrack
-  :type  'boolean)
-
-(make-variable-buffer-local 'dirtrackp)
-
 (defcustom dirtrack-directory-function
   (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
       'dirtrack-windows-directory-function
--- a/lisp/iimage.el	Tue May 11 06:12:46 2010 +0000
+++ b/lisp/iimage.el	Tue May 11 22:45:13 2010 +0000
@@ -55,19 +55,17 @@
   :group 'image)
 
 (defconst iimage-version "1.1")
-(defvar iimage-mode nil)
-(defvar iimage-mode-map nil)
 
-;; Set up key map.
-(unless iimage-mode-map
-  (setq iimage-mode-map (make-sparse-keymap))
-  (define-key iimage-mode-map "\C-l" 'iimage-recenter))
+(defvar iimage-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-l" 'iimage-recenter)
+    map))
 
 (defun iimage-recenter (&optional arg)
-"Re-draw images and recenter."
+  "Re-draw images and recenter."
   (interactive "P")
-  (iimage-mode-buffer 0)
-  (iimage-mode-buffer 1)
+  (iimage-mode-buffer nil)
+  (iimage-mode-buffer t)
   (recenter arg))
 
 (defvar iimage-mode-image-filename-regex
@@ -81,7 +79,7 @@
   `((,(concat "\\(`?file://\\|\\[\\[\\|<\\|`\\)?"
 	      "\\(" iimage-mode-image-filename-regex "\\)"
 	      "\\(\\]\\]\\|>\\|'\\)?") . 2))
-"*Alist of filename REGEXP vs NUM.
+  "*Alist of filename REGEXP vs NUM.
 Each element looks like (REGEXP . NUM).
 NUM specifies which parenthesized expression in the regexp.
 
@@ -90,54 +88,43 @@
     `file://foo.png'
     \\[\\[foo.gif]]
     <foo.png>
-     foo.JPG
-")
+     foo.JPG")
 
 (defvar iimage-mode-image-search-path nil
-"*List of directories to search for image files for iimage-mode.")
+  "*List of directories to search for image files for `iimage-mode'.")
 
 ;;;###autoload
-(defun turn-on-iimage-mode ()
-"Unconditionally turn on iimage mode."
-  (interactive)
-  (iimage-mode 1))
+(define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1")
 
 (defun turn-off-iimage-mode ()
-"Unconditionally turn off iimage mode."
+  "Unconditionally turn off iimage mode."
   (interactive)
   (iimage-mode 0))
 
-(defalias 'iimage-locate-file 'locate-file)
-
 (defun iimage-mode-buffer (arg)
-"Display/undisplay images.
-With numeric ARG, display the images if and only if ARG is positive."
-  (interactive)
-  (let ((ing (if (numberp arg)
-		 (> arg 0)
-	       iimage-mode))
-	(modp (buffer-modified-p (current-buffer)))
-	file buffer-read-only)
-    (save-excursion
-      (goto-char (point-min))
-      (dolist (pair iimage-mode-image-regex-alist)
-	(while (re-search-forward (car pair) nil t)
-	  (if (and (setq file (match-string (cdr pair)))
-		   (setq file (iimage-locate-file file
-				   (cons default-directory
-					 iimage-mode-image-search-path))))
-	      (if ing
-		  (add-text-properties (match-beginning 0) (match-end 0)
-				       (list 'display (create-image file)))
-		(remove-text-properties (match-beginning 0) (match-end 0)
-					'(display)))))))
-    (set-buffer-modified-p modp)))
+  "Display images if ARG is non-nil, undisplay them otherwise."
+  (let ((image-path (cons default-directory iimage-mode-image-search-path))
+	file)
+    (with-silent-modifications
+      (save-excursion
+        (goto-char (point-min))
+        (dolist (pair iimage-mode-image-regex-alist)
+          (while (re-search-forward (car pair) nil t)
+            (if (and (setq file (match-string (cdr pair)))
+                     (setq file (locate-file file image-path)))
+                ;; FIXME: we don't mark our images, so we can't reliably
+                ;; remove them either (we may leave some of ours, and we
+                ;; may remove other packages's display properties).
+                (if arg
+                    (add-text-properties (match-beginning 0) (match-end 0)
+                                         (list 'display (create-image file)))
+                  (remove-text-properties (match-beginning 0) (match-end 0)
+                                          '(display))))))))))
 
 ;;;###autoload
 (define-minor-mode iimage-mode
   "Toggle inline image minor mode."
   :group 'iimage :lighter " iImg" :keymap iimage-mode-map
-  (run-hooks 'iimage-mode-hook)
   (iimage-mode-buffer iimage-mode))
 
 (provide 'iimage)
--- a/lisp/minibuffer.el	Tue May 11 06:12:46 2010 +0000
+++ b/lisp/minibuffer.el	Tue May 11 22:45:13 2010 +0000
@@ -1835,8 +1835,8 @@
                   (lambda (x)
                     (cond
                      ((stringp x) (regexp-quote x))
-                     ((if (consp group) (memq x group) group)
-                      "\\(.*?\\)" ".*?")))
+                     ((if (consp group) (memq x group) group) "\\(.*?\\)")
+		     (t ".*?")))
                   pattern
                   ""))))
     ;; Avoid pathological backtracking.
--- a/lisp/scroll-all.el	Tue May 11 06:12:46 2010 +0000
+++ b/lisp/scroll-all.el	Tue May 11 22:45:13 2010 +0000
@@ -90,9 +90,9 @@
 	 (call-interactively 'scroll-all-scroll-down-all))
 	((eq this-command 'previous-line)
 	 (call-interactively 'scroll-all-scroll-up-all))
-	((eq this-command 'scroll-up)
+	((memq this-command '(scroll-up scroll-up-command))
 	 (call-interactively 'scroll-all-page-down-all))
-	((eq this-command 'scroll-down)
+	((memq this-command '(scroll-down scroll-down-command))
 	 (call-interactively 'scroll-all-page-up-all))
 	((eq this-command 'beginning-of-buffer)
 	 (call-interactively 'scroll-all-beginning-of-buffer-all))
--- a/src/ChangeLog	Tue May 11 06:12:46 2010 +0000
+++ b/src/ChangeLog	Tue May 11 22:45:13 2010 +0000
@@ -1,3 +1,8 @@
+2010-05-11  Karel Klic  <kklic@redhat.com>
+
+	* ftfont.c: Fix incorrect parentheses of #if condition for
+	definining M17N_FLT_USE_NEW_FEATURE.
+
 2010-05-11  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (LIBS_SYSTEM) [MSDOS]: Do not reset.
--- a/src/ftfont.c	Tue May 11 06:12:46 2010 +0000
+++ b/src/ftfont.c	Tue May 11 22:45:13 2010 +0000
@@ -1578,8 +1578,8 @@
 
 #ifdef HAVE_M17N_FLT
 
-#if ((LIBOTF_MAJOR_VERSION > 1) || (LIBOTF_RELEASE_NUMBER >= 10) \
-     && (M17NLIB_MAJOR_VERSION > 1) || (M17NLIB_MINOR_VERSION >= 6))
+#if (((LIBOTF_MAJOR_VERSION > 1) || (LIBOTF_RELEASE_NUMBER >= 10))	\
+     && ((M17NLIB_MAJOR_VERSION > 1) || (M17NLIB_MINOR_VERSION >= 6)))
 /* We can use the new feature of libotf and m17n-flt to handle the
    character encoding scheme introduced in Unicode 5.1 and 5.2 for
    some Agian scripts.  */
--- a/src/xdisp.c	Tue May 11 06:12:46 2010 +0000
+++ b/src/xdisp.c	Tue May 11 22:45:13 2010 +0000
@@ -2699,8 +2699,8 @@
   it->multibyte_p = !NILP (current_buffer->enable_multibyte_characters);
 
   /* 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
+     unibyte buffer: by definition, none of the single-byte characters
+     are strong R2L, 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;