diff options
-rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
-rw-r--r-- | doc/lispref/debugging.texi | 2 | ||||
-rw-r--r-- | lisp/ChangeLog | 28 | ||||
-rw-r--r-- | lisp/emacs-lisp/shadow.el | 8 | ||||
-rw-r--r-- | lisp/ido.el | 23 | ||||
-rw-r--r-- | lisp/mail/emacsbug.el | 11 | ||||
-rw-r--r-- | lisp/pcmpl-gnu.el | 3 | ||||
-rw-r--r-- | lisp/progmodes/idlw-shell.el | 2 | ||||
-rw-r--r-- | lisp/subr.el | 4 | ||||
-rw-r--r-- | src/ChangeLog | 27 | ||||
-rw-r--r-- | src/eval.c | 7 | ||||
-rw-r--r-- | src/fileio.c | 7 | ||||
-rw-r--r-- | src/unexmacosx.c | 21 | ||||
-rw-r--r-- | src/xdisp.c | 43 |
14 files changed, 151 insertions, 39 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 329c194f45..6e4ffff3df 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2012-09-12 Glenn Morris <[email protected]> + + * debugging.texi (Using Debugger): Fix typo. + 2012-09-18 Chong Yidong <[email protected]> * display.texi (Faces): Discuss anonymous faces. diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 5aeff576d0..2226db942d 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -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}. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7f4193e77..e6fa549e86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,31 @@ +2012-09-21 Leo Liu <[email protected]> + + 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 <[email protected]> (tiny change) + + * progmodes/idlw-shell.el (idlwave-shell-complete-filename): + Fix 2011-05-17 change. (Bug#12418) + +2012-09-21 Leo Liu <[email protected]> + + * subr.el (ignore-errors): Mention with-demoted-errors in doc-string. + +2012-09-21 Glenn Morris <[email protected]> + + * emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords): + Be more robust about locating simple.el. + +2012-09-21 Glenn Morris <[email protected]> + + * mail/emacsbug.el (report-emacs-bug): Trap load-path-shadows errors. + +2012-09-21 Joel Bion <[email protected]> (tiny change) + + * pcmpl-gnu.el (pcmpl-gnu-tarfile-regexp): Add tar.xz. (Bug#12382) + 2012-09-20 Juri Linkov <[email protected]> * replace.el (query-replace-read-from): Use `read-regexp' instead diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 286c4937b5..bceec296ad 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -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'.") diff --git a/lisp/ido.el b/lisp/ido.el index 2100def199..d48e7ba858 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -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))) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 6ee3c7898c..ca9bc6b867 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -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))) diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el index da72c81c44..be389e9c25 100644 --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el @@ -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) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 08d1461c00..0abd4daf61 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -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." diff --git a/lisp/subr.el b/lisp/subr.el index e9b85ff1f3..13516419b6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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))) diff --git a/src/ChangeLog b/src/ChangeLog index c3ce1ee1b0..f3b8b2108e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,30 @@ +2012-09-21 YAMAMOTO Mitsuharu <[email protected]> + + * 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 <[email protected]> + + * eval.c (Frun_hook_with_args_until_success) + (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393) + +2012-09-21 Andreas Schwab <[email protected]> + + * fileio.c (Ffile_selinux_context): Only call freecon when + lgetfilecon succeeded. + (Fset_file_selinux_context): Likewise. (Bug#12444) + +2012-09-21 Eli Zaretskii <[email protected]> + + * 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 <[email protected]> * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after* diff --git a/src/eval.c b/src/eval.c index 1c565e233c..e47478bb1f 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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. diff --git a/src/fileio.c b/src/fileio.c index ca71af7ed9..6c4e34d731 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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 diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 05a16466df..d38b91e955 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -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 diff --git a/src/xdisp.c b/src/xdisp.c index 5ee5a46601..f00719be37 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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; + } + } } } |