]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs-24; up to 2012-05-07T14:57:18Z!michael.albinus@gmx.de
authorChong Yidong <cyd@gnu.org>
Fri, 21 Sep 2012 03:03:48 +0000 (11:03 +0800)
committerChong Yidong <cyd@gnu.org>
Fri, 21 Sep 2012 03:03:48 +0000 (11:03 +0800)
14 files changed:
doc/lispref/ChangeLog
doc/lispref/debugging.texi
lisp/ChangeLog
lisp/emacs-lisp/shadow.el
lisp/ido.el
lisp/mail/emacsbug.el
lisp/pcmpl-gnu.el
lisp/progmodes/idlw-shell.el
lisp/subr.el
src/ChangeLog
src/eval.c
src/fileio.c
src/unexmacosx.c
src/xdisp.c

index 329c194f45ac9316d299803afab38fa0db3d8cb1..6e4ffff3df6432e9a4e31dd4296db26ddaae165b 100644 (file)
@@ -1,3 +1,7 @@
+2012-09-12  Glenn Morris  <rgm@gnu.org>
+
+       * debugging.texi (Using Debugger): Fix typo.
+
 2012-09-18  Chong Yidong  <cyd@gnu.org>
 
        * display.texi (Faces): Discuss anonymous faces.
index 5aeff576d09335a7a694b166a2be7c34d4605d6b..2226db942d1e0c4c861f6a5804ba921a3bfb9db1 100644 (file)
@@ -331,7 +331,7 @@ variable is temporarily set according to
 non-@code{nil}, @code{debug-on-error} will temporarily be set to
 @code{t}.  This means that any further errors that occur while doing a
 debugging session will (by default) trigger another backtrace.  If
-this is not want you want, you can either set
+this is not what you want, you can either set
 @code{eval-expression-debug-on-error} to @code{nil}, or set
 @code{debug-on-error} to @code{nil} in @code{debugger-mode-hook}.
 
index f7f4193e7776a377c089ac4007072d3b5bd591d6..e6fa549e8671b62d1f6e4557b12df20688ccf252 100644 (file)
@@ -1,3 +1,31 @@
+2012-09-21  Leo Liu  <sdl.web@gmail.com>
+
+       IDO: Disable match re-ordering for buffer switching.
+       * ido.el (ido-buffer-disable-smart-matches): New variable.
+       (ido-set-matches-1): Use it.  (Bug#2042)
+
+2012-09-21  Jose Marino  <marinoj@nso.edu>  (tiny change)
+
+       * progmodes/idlw-shell.el (idlwave-shell-complete-filename):
+       Fix 2011-05-17 change.  (Bug#12418)
+
+2012-09-21  Leo Liu  <sdl.web@gmail.com>
+
+       * subr.el (ignore-errors): Mention with-demoted-errors in doc-string.
+
+2012-09-21  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords):
+       Be more robust about locating simple.el.
+
+2012-09-21  Glenn Morris  <rgm@gnu.org>
+
+       * mail/emacsbug.el (report-emacs-bug): Trap load-path-shadows errors.
+
+2012-09-21  Joel Bion  <jpbion@westvi.com>  (tiny change)
+
+       * pcmpl-gnu.el (pcmpl-gnu-tarfile-regexp): Add tar.xz.  (Bug#12382)
+
 2012-09-20  Juri Linkov  <juri@jurta.org>
 
        * replace.el (query-replace-read-from): Use `read-regexp' instead
index 286c4937b5b0011302481f439b1218d097b756dc..bceec296ad81575af73421dbcec4cc40d57fb8c8 100644 (file)
@@ -158,8 +158,14 @@ See the documentation for `list-load-path-shadows' for further information."
                      (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2))))))))
 
 (defvar load-path-shadows-font-lock-keywords
+  ;; The idea is that shadows of files supplied with Emacs are more
+  ;; serious than various versions of external packages shadowing each
+  ;; other.
   `((,(format "hides \\(%s.*\\)"
-             (file-name-directory (locate-library "simple.el")))
+             (file-name-directory
+              (or (locate-library "simple")
+                  (file-name-as-directory
+                   (expand-file-name "../lisp" data-directory)))))
      . (1 font-lock-warning-face)))
   "Keywords to highlight in `load-path-shadows-mode'.")
 
index 2100def1992ab4a409e7bb37e3a50794f43b05a5..d48e7ba858ba6209192b45fbb5b358ec637bac66 100644 (file)
@@ -493,6 +493,18 @@ as first char even if `ido-enable-prefix' is nil."
   :type 'boolean
   :group 'ido)
 
+;; See http://debbugs.gnu.org/2042 for more info.
+(defcustom ido-buffer-disable-smart-matches t
+  "Non-nil means not to re-order matches for buffer switching.
+By default, ido aranges matches in the following order:
+
+  full-matches > suffix matches > prefix matches > remaining matches
+
+which can get in the way for buffer switching."
+  :version "24.3"
+  :type 'boolean
+  :group 'ido)
+
 (defcustom ido-confirm-unique-completion nil
   "Non-nil means that even a unique completion must be confirmed.
 This means that \\[ido-complete] must always be followed by \\[ido-exit-minibuffer]
@@ -3688,10 +3700,17 @@ This is to make them appear as if they were \"virtual buffers\"."
         (rex0 (if ido-enable-regexp text (regexp-quote text)))
         (rexq (concat rex0 (if slash ".*/" "")))
         (re (if ido-enable-prefix (concat "\\`" rexq) rexq))
-        (full-re (and do-full (not ido-enable-regexp) (not (string-match "\$\\'" rex0))
+        (full-re (and do-full
+                      (and (eq ido-cur-item 'buffer)
+                           (not ido-buffer-disable-smart-matches))
+                      (not ido-enable-regexp)
+                      (not (string-match "\$\\'" rex0))
                       (concat "\\`" rex0 (if slash "/" "") "\\'")))
         (suffix-re (and do-full slash
-                        (not ido-enable-regexp) (not (string-match "\$\\'" rex0))
+                        (and (eq ido-cur-item 'buffer)
+                             (not ido-buffer-disable-smart-matches))
+                        (not ido-enable-regexp)
+                        (not (string-match "\$\\'" rex0))
                         (concat rex0 "/\\'")))
         (prefix-re (and full-re (not ido-enable-prefix)
                         (concat "\\`" rexq)))
index 6ee3c7898c5e88327cf8bfa8079ac6bf3d417b9a..ca9bc6b867657b814cedd6b12a909cc8ef5d9fb1 100644 (file)
@@ -308,9 +308,14 @@ usually do not have translators for other languages.\n\n")))
       (insert "\n"))
     (insert "\n")
     (insert "Load-path shadows:\n")
-    (message "Checking for load-path shadows...")
-    (let ((shadows (list-load-path-shadows t)))
-      (message "Checking for load-path shadows...done")
+    (let* ((msg "Checking for load-path shadows...")
+          (result "done")
+          (shadows (progn (message "%s" msg)
+                          (condition-case nil (list-load-path-shadows t)
+                            (error
+                             (setq result "error")
+                             "Error during checking")))))
+      (message "%s%s" msg result)
       (insert (if (zerop (length shadows))
                   "None found.\n"
                 shadows)))
index da72c81c44a50cc18912a20cd8b6f4c5520d7b12..be389e9c25adc499c986d8e168ac97480f5056e8 100644 (file)
       (pcomplete-uniqify-list rules))))
 
 (defcustom pcmpl-gnu-tarfile-regexp
-  "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'"
+  "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\|xz\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'"
   "A regexp which matches any tar archive."
+  :version "24.3"                       ; added xz
   :type 'regexp
   :group 'pcmpl-gnu)
 
index 08d1461c008b5599a94269be43a254f325973b17..0abd4daf61b9279b526c0bfa506bfbc8f451f422 100644 (file)
@@ -2170,7 +2170,7 @@ args of an executive .run, .rnew or .compile."
   ;; CWD might have changed, resync, to set default directory
   (idlwave-shell-resync-dirs)
   (let ((comint-file-name-chars idlwave-shell-file-name-chars))
-    (comint-filename-completion)))
+    (comint-dynamic-complete-filename)))
 
 (defun idlwave-shell-executive-command ()
   "Return the name of the current executive command, if any."
index e9b85ff1f38b0c976a1adba48a365a437aef7e45..13516419b6ff1e7ab3d878cbca07e6b9e960ae00 100644 (file)
@@ -280,7 +280,9 @@ Treated as a declaration when used at the right place in a
 
 (defmacro ignore-errors (&rest body)
   "Execute BODY; if an error occurs, return nil.
-Otherwise, return result of last form in BODY."
+Otherwise, return result of last form in BODY.
+See also `with-demoted-errors' that does something similar
+without silencing all errors."
   (declare (debug t) (indent 0))
   `(condition-case nil (progn ,@body) (error nil)))
 \f
index c3ce1ee1b0b3ef788d341d709f6f6b619d77da16..f3b8b2108e1f27bc2f71f302b3d729926f92792d 100644 (file)
@@ -1,3 +1,30 @@
+2012-09-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
+       (print_load_command_name): Add case LC_DATA_IN_CODE.
+       (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
+
+2012-09-21  Glenn Morris  <rgm@gnu.org>
+
+       * eval.c (Frun_hook_with_args_until_success)
+       (Frun_hook_with_args_until_failure): Doc fixes.  (Bug#12393)
+
+2012-09-21  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * fileio.c (Ffile_selinux_context): Only call freecon when
+       lgetfilecon succeeded.
+       (Fset_file_selinux_context): Likewise.  (Bug#12444)
+
+2012-09-21  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (try_window_reusing_current_matrix): Under bidi
+       reordering, locate the cursor by calling set_cursor_from_row; if
+       that fails, clear the desired glyph matrix before returning a
+       failure indication to the caller.  Fixes leaving garbled display
+       when fast scrolling with a down-key.  (Bug#12403)
+       (compute_stop_pos_backwards): Fix a typo that caused crashes while
+       scrolling through multibyte text.
+
 2012-09-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
index 1c565e233c6aa13efc70efe216d6f711210e79e0..e47478bb1f139f8b8de834a460854fed304791d4 100644 (file)
@@ -2399,6 +2399,7 @@ If it is a list of functions, those functions are called, in order,
 with the given arguments ARGS, until one of them
 returns a non-nil value.  Then we return that value.
 However, if they all return nil, we return nil.
+If the value of HOOK is nil, this function returns nil.
 
 Do not use `make-local-variable' to make a hook variable buffer-local.
 Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -2420,10 +2421,12 @@ DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure,
 HOOK should be a symbol, a hook variable.  If HOOK has a non-nil
 value, that value may be a function or a list of functions to be
 called to run the hook.  If the value is a function, it is called with
-the given arguments and its return value is returned.
+the given arguments.  Then we return nil if the function returns nil,
+and t if it returns non-nil.
 If it is a list of functions, those functions are called, in order,
 with the given arguments ARGS, until one of them returns nil.
-Then we return nil.  However, if they all return non-nil, we return non-nil.
+Then we return nil.  However, if they all return non-nil, we return t.
+If the value of HOOK is nil, this function returns t.
 
 Do not use `make-local-variable' to make a hook variable buffer-local.
 Instead, use `add-hook' and specify t for the LOCAL argument.
index ca71af7ed9528b9425b8b3e7e4e6e506bc237c7f..6c4e34d7312dd4f1bfce437cfdefb0f96a82818d 100644 (file)
@@ -2833,9 +2833,8 @@ or if SELinux is disabled, or if Emacs lacks SELinux support.  */)
          if (context_range_get (context))
            values[3] = build_string (context_range_get (context));
          context_free (context);
+         freecon (con);
        }
-      if (con)
-       freecon (con);
     }
 #endif
 
@@ -2914,12 +2913,10 @@ compiled with SELinux support.  */)
            report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
 
          context_free (parsed_con);
+         freecon (con);
        }
       else
        report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil));
-
-      if (con)
-       freecon (con);
     }
 #endif
 
index 05a16466dfb62ac47abc7116d6d798c9788a190f..d38b91e955aa11c6624b19a28a756ec0927c2e3d 100644 (file)
@@ -117,6 +117,13 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <assert.h>
 
+/* LC_DATA_IN_CODE is not defined in mach-o/loader.h on OS X 10.7.
+   But it is used if we build with "Command Line Tools for Xcode 4.5
+   (OS X Lion) - Septemper 2012".  */
+#ifndef LC_DATA_IN_CODE
+#define LC_DATA_IN_CODE 0x29 /* table of non-instructions in __text */
+#endif
+
 #ifdef _LP64
 #define mach_header                    mach_header_64
 #define segment_command                        segment_command_64
@@ -612,6 +619,11 @@ print_load_command_name (int lc)
       printf ("LC_MAIN          ");
       break;
 #endif
+#ifdef LC_DATA_IN_CODE
+    case LC_DATA_IN_CODE:
+      printf ("LC_DATA_IN_CODE  ");
+      break;
+#endif
 #ifdef LC_SOURCE_VERSION
     case LC_SOURCE_VERSION:
       printf ("LC_SOURCE_VERSION");
@@ -1178,9 +1190,9 @@ copy_dyld_info (struct load_command *lc, long delta)
 #endif
 
 #ifdef LC_FUNCTION_STARTS
-/* Copy a LC_FUNCTION_STARTS/LC_DYLIB_CODE_SIGN_DRS load command from
-   the input file to the output file, adjusting the data offset
-   field.  */
+/* Copy a LC_FUNCTION_STARTS/LC_DATA_IN_CODE/LC_DYLIB_CODE_SIGN_DRS
+   load command from the input file to the output file, adjusting the
+   data offset field.  */
 static void
 copy_linkedit_data (struct load_command *lc, long delta)
 {
@@ -1274,6 +1286,9 @@ dump_it (void)
 #endif
 #ifdef LC_FUNCTION_STARTS
       case LC_FUNCTION_STARTS:
+#ifdef LC_DATA_IN_CODE
+      case LC_DATA_IN_CODE:
+#endif
 #ifdef LC_DYLIB_CODE_SIGN_DRS
       case LC_DYLIB_CODE_SIGN_DRS:
 #endif
index 5ee5a46601cfac32eca0a3df946705d26825c974..f00719be37a3d1ac558454f1dd3c00ace385509e 100644 (file)
@@ -7755,7 +7755,7 @@ compute_stop_pos_backwards (struct it *it)
     {
       it->end_charpos = min (charpos + 1, ZV);
       charpos = max (charpos - SCAN_BACK_LIMIT, BEGV);
-      SET_TEXT_POS (pos, charpos, BYTE_TO_CHAR (charpos));
+      SET_TEXT_POS (pos, charpos, CHAR_TO_BYTE (charpos));
       reseat_1 (it, pos, 0);
       compute_stop_pos (it);
       /* We must advance forward, right?  */
@@ -16744,28 +16744,33 @@ try_window_reusing_current_matrix (struct window *w)
            }
          if (row < bottom_row)
            {
-             struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
-             struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
-
-             /* Can't use this optimization with bidi-reordered glyph
-                rows, unless cursor is already at point. */
+             /* Can't simply scan the row for point with
+                bidi-reordered glyph rows.  Let set_cursor_from_row
+                figure out where to put the cursor, and if it fails,
+                give up.  */
              if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)))
                {
-                 if (!(w->cursor.hpos >= 0
-                       && w->cursor.hpos < row->used[TEXT_AREA]
-                       && BUFFERP (glyph->object)
-                       && glyph->charpos == PT))
-                   return 0;
+                 if (!set_cursor_from_row (w, row, w->current_matrix,
+                                           0, 0, 0, 0))
+                   {
+                     clear_glyph_matrix (w->desired_matrix);
+                     return 0;
+                   }
                }
              else
-               for (; glyph < end
-                      && (!BUFFERP (glyph->object)
-                          || glyph->charpos < PT);
-                    glyph++)
-                 {
-                   w->cursor.hpos++;
-                   w->cursor.x += glyph->pixel_width;
-                 }
+               {
+                 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
+                 struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
+
+                 for (; glyph < end
+                        && (!BUFFERP (glyph->object)
+                            || glyph->charpos < PT);
+                      glyph++)
+                   {
+                     w->cursor.hpos++;
+                     w->cursor.x += glyph->pixel_width;
+                   }
+               }
            }
        }