1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

Merge from emacs-24; up to 2012-05-07T14:57:18Z!michael.albinus@gmx.de

This commit is contained in:
Chong Yidong 2012-09-21 11:03:48 +08:00
commit acfa068f4a
14 changed files with 151 additions and 39 deletions

View 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.

View 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}.

View 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

View 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'.")

View 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)))

View 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)))

View File

@ -128,8 +128,9 @@
(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)

View 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."

View 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)))

View 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*

View 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.

View 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

View 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

View 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;
}
}
}
}