Alan Mackenzie [Sat, 2 Feb 2013 18:24:10 +0000 (18:24 +0000)]
Fix bug in the state cache mechanism. Remove 'BOD "strategy". Refactor.
cc-engine.el (c-get-fallback-scan-pos): Remove.
(c-parse-state-get-strategy): Don't return 'BOD any more.
(c-append-lower-brace-pair-to-state-cache): Extra parameter HERE instead
of narrowing. Widen to top of buffer before searching backwards for a
brace pair.
(c-state-push-any-brace-pair): Add HERE parameter to function call.
(c-append-to-state-cache): Extra parameter HERE in place of narrowing.
Narrow to parameter HERE, in place of being called narrowed.
(c-remove-stale-state-cache): Extra parameter HERE in place of narrowing.
Check there's an open brace in the cache before searching for its match.
(c-invalidate-state-cache-1): Add HERE parameter to function call.
(c-parse-state-1): Don't narrow here for 'forward strategy, instead
passing extra parameter HERE to several functions. Remove 'BOD strategy.
Stefan Monnier [Fri, 1 Feb 2013 23:40:55 +0000 (18:40 -0500)]
* lisp/mouse.el (mouse-drag-track): Always deactivate the mark before
running the final event's command since that command is in charge of
activating the mark if needed.
Juri Linkov [Fri, 1 Feb 2013 23:38:41 +0000 (01:38 +0200)]
* lisp/replace.el (perform-replace): Move let-bindings of isearch-*
variables deeper to the loop that searches for the next match.
Add bindings for `isearch-nonincremental' and `isearch-adjusted'.
Use `isearch-search-fun-default' instead of `isearch-search-fun'.
* lisp/isearch.el (isearch-search-fun-default): Check for null
first element of isearch-cmds as a precaution when it's used
with inactive isearch.
Eli Zaretskii [Fri, 1 Feb 2013 10:15:36 +0000 (12:15 +0200)]
Make sure program names are encoded before using them to invoke subprocesses.
src/callproc.c (Fcall_process): Make sure program name in PATH and
new_argv[0] is encoded, if needed. Otherwise, un-encoded string
is passed to exec/spawnve, which fails unless the file-name
encoding is UTF-8.
Glenn Morris [Wed, 30 Jan 2013 17:14:24 +0000 (09:14 -0800)]
mouse-drag-line changes for mouse-1 in header-line
* lisp/mouse.el (mouse-drag-line): Avoid pushing same event onto
unread-command-events twice in some cases. This tries to implement
the 2012-07-26 changes in a different way.
Eli Zaretskii [Sat, 26 Jan 2013 12:49:34 +0000 (14:49 +0200)]
Fix bug #13553 with usage of IS_DIRECTORY_SEP on MS-Windows under DBCS.
src/w32.c (parse_root, get_volume_info, readdir, read_unc_volume)
(logon_network_drive, stat_worker, symlink, chase_symlinks): Use
CharNextExA and CharPrevExA to iterate over file names encoded in
DBCS.
Alan Mackenzie [Wed, 23 Jan 2013 18:58:11 +0000 (18:58 +0000)]
Fix a bug in the state cache mechanism. Refactor this a bit.
cc-engine.el (c-parse-state-get-strategy): Remove the `cache-pos' element
from the return value.
(c-append-lower-brace-pair-to-state-cache): "Narrow" to end of buffer to
enable proper searching from beyond HERE.
Amend the test for detecting the sought brace pair. Amend the value
written to the "brace desert cache" when the brace isn't found.
(c-remove-stale-state-cache): Rename `good-pos' to `start-point', and
several other variables analogously.
(c-remove-stale-state-cache-backwards): Change `cache-pos' from a
parameter to a locally calculated variable.
(c-parse-state-1): Change the calling conventions to the two defuns
involving `cache-pos'.
Eli Zaretskii [Wed, 23 Jan 2013 16:11:04 +0000 (18:11 +0200)]
Fix bug #13515 with processing DBCS file names on MS-Windows.
src/w32.c (max_filename_mbslen): New function.
(normalize_filename, readdir): Use it to detect locales where ANSI
encoding of file names uses a double-byte character set (DBCS).
If a DBCS encoding is used, advance by characters using
CharNextExA, instead of incrementing a 'char *' pointer. Use
_mbslwr instead of _strlwr.
Chong Yidong [Wed, 23 Jan 2013 06:25:50 +0000 (14:25 +0800)]
* xml.el (xml-entity-or-char-ref-re): Fix regexp.
This bug was reported by Jae-oh Kim; it was posted to bug-gnu-emacs
but didn't show up in the bug tracker for some reason. It is a
regression against Emacs 24.2.
Jan Djärv [Sun, 13 Jan 2013 14:29:22 +0000 (15:29 +0100)]
* nsfont.m (LCD_SMOOTHING_MARGIN): New define.
(nsfont_draw): Remove disabling of LCD smoothing.
(ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
Bug#11484 with LCD smooting on.
Paul Eggert [Fri, 11 Jan 2013 07:51:25 +0000 (23:51 -0800)]
Backport typo fix from trunk, for AIX.
* eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
This follows up on the 2012-09-29 patch that removed indirection
for the 'function' field. Reported by Sergey Vinokurov in
<http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
Alan Mackenzie [Wed, 9 Jan 2013 21:33:00 +0000 (21:33 +0000)]
Fix bugs in the c-parse-state mechanism. Reuse some markers instead of
continually generating new ones.
cc-engine.el (c-state-old-cpp-beg-marker, c-state-old-cpp-end-marker):
New variables.
(c-append-lower-brace-pair-to-state-cache): Start a backward search for
"}" definitively outside CPP constructs.
(c-remove-stale-state-cache): Inform the caller of a need to search back
for a brace pair in certain circumstances.
(c-state-maybe-marker): New macro.
(c-parse-state): Reuse markers when appropriate.
Juri Linkov [Wed, 9 Jan 2013 00:20:02 +0000 (02:20 +0200)]
* lisp/international/mule-cmds.el (read-char-by-name): Move let-binding
of completion-ignore-case around completing-read to fix regression
exhibited by the test case `C-x 8 RET *acc TAB' and caused by
`string-match-p' using the nil value of `case-fold-search' and
`completion-ignore-case' in `completion-pcm--all-completions'..
Eli Zaretskii [Sat, 5 Jan 2013 13:37:36 +0000 (15:37 +0200)]
Improve display of glyph matrix by dump-glyph-matrix.
src/xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead
of a non-portable "t" to print ptrdiff_t values. Allow up to 9
digits for buffer positions, before misalignment starts. Display
"0" for integer "object" field.
(dump_glyph_row): Adapt the header line to changes in dump_glyph.
Display the newline glyph more unambiguously.
Michael Albinus [Fri, 4 Jan 2013 09:41:23 +0000 (10:41 +0100)]
* net/tramp-sh.el (tramp-set-file-uid-gid): UID and GID must be
non-negative integers. Otherwise, the default values are used.
(tramp-convert-file-attributes): Convert uid and gid to integers.
Glenn Morris [Thu, 3 Jan 2013 02:54:10 +0000 (18:54 -0800)]
etags.el fix for compressed files
* lisp/progmodes/etags.el (tags-compression-info-list): Doc fix.
(tag-find-file-of-tag-noselect):
Check auto-compression-mode rather than 'jka-compr being loaded.