Stefan Monnier [Thu, 31 Jan 2013 01:58:24 +0000 (20:58 -0500)]
* lisp/progmodes/opascal.el: Rename from delphi.el. Use lexical-binding.
(opascal-newline-always-indents): Remove custom.
(opascal-tab, opascal-newline): Remove commands.
(opascal-new-comment-line): Insert "\n" instead of calling newline.
(opascal-mode-map): Keep default bindings for RET and TAB and DEL.
(opascal-save-match-data): Remove, use save-match-data instead.
(opascal-save-state): Use with-silent-modifications.
Juri Linkov [Wed, 30 Jan 2013 23:50:11 +0000 (01:50 +0200)]
* lisp/frame.el (toggle-frame-maximized, toggle-frame-fullscreen):
Use fullboth as an alias for fullscreen. Suggested by Jan Djärv in
<http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00203.html>.
Stefan Monnier [Wed, 30 Jan 2013 20:46:10 +0000 (15:46 -0500)]
* lisp/progmodes/make-mode.el (makefile-backslash-region): Don't compute
column if we're just deleting the backslashes.
(makefile-fill-paragraph): Use eolp.
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.
Alan Mackenzie [Tue, 29 Jan 2013 20:51:07 +0000 (20:51 +0000)]
Amend to fontify /regexp/s in actions correctly.
cc-awk.el (c-awk-harmless-char-re, c-awk-harmless-string*-re):
(c-awk-harmless-string*-here-re): braces, parens and semicolons are no
longer included.
(c-awk-harmless-line-char-re, c-awk-harmless-line-string*-re): What used
to be these variables without "-line" in the name.
(c-awk-neutral-re): { is no longer neutral. Escaped newlines now are.
(c-awk-non-arith-op-bra-re): Now also matches {.
(c-awk-pre-exp-alphanum-kwd-re): New regexp to match "print", "return",
and "case".
(c-awk-kwd-regexp-sign-re): New, to match "print", etc., followed by /.
(c-awk-syntax-tablify-/): Check special cases "print /re/", etc.
(c-awk-set-syntax-table-properties): Extend FSM to handle {,},(,),;.
Michael Albinus [Tue, 29 Jan 2013 08:12:11 +0000 (09:12 +0100)]
* net/ange-ftp.el (ange-ftp-skip-msgs): Add another message.
* net/tramp-sh.el (tramp-sh-handle-start-file-process): Catch
`suppress'. Otherwise, `tramp-run-real-handler' might be called
in `tramp-file-name-handler'.
Dmitry Antipov [Mon, 28 Jan 2013 05:47:51 +0000 (09:47 +0400)]
Remove obsolete redisplay code. See the discussion at
http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
* dispnew.c (preemption_period, preemption_next_check): Remove.
(Vredisplay_preemption_period): Likewise.
(update_frame, update_single_window, update_window, update_frame_1):
Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
used, following the 2012-06-22 change.
Dmitry Gutov [Mon, 28 Jan 2013 01:20:42 +0000 (05:20 +0400)]
* progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe
temporarily) broken indentation.
* automated/ruby-mode-tests.el (ruby-block-test-example):
Break indentation of the do block opener and add a line inside it.
* automated/ruby-mode-tests.el (works-on-do, ok-with-three):
Adjust line numbers.
Andreas Schwab [Sat, 26 Jan 2013 15:13:09 +0000 (16:13 +0100)]
Fixes: debbugs:13556
* emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional
parameter BAR-NOT-SYMBOL to control syntax of | for font-lock.
(lisp-mode): Pass t for it.
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.
Dmitry Antipov [Thu, 24 Jan 2013 05:41:28 +0000 (09:41 +0400)]
Drop async_visible and async_iconified fields of struct frame.
This is possible because async input is gone; for details, see
http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
* frame.h (struct frame): Remove async_visible and async_iconified
members, convert garbaged to unsigned bitfield. Adjust comments.
(FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users.
(SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
* frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
* w32term.c: Ditto.
(w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
properly. Likewise for obscured.
* xterm.c: Ditto.
(handle_one_xevent): Save visible state go generate ICONIFY_EVENT
properly.
* nsterm.m: Ditto.
(windowDidDeminiaturize): Generate DEICONIFY_EVENT.
Dmitry Antipov [Thu, 24 Jan 2013 03:34:20 +0000 (07:34 +0400)]
* src/insdel.c (prepare_to_modify_buffer): Revert last change as suggested
in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html.
* lisp/doc-view.el (doc-view-display): Force mode line update until
all document is converted. Suggested by Stefan Monnier (Bug#13164).
Stefan Monnier [Wed, 23 Jan 2013 20:07:28 +0000 (15:07 -0500)]
* src/xdisp.c (message2, message2_nolog): Remove functions.
(message3, message3_nolog): Extract nbytes and multibyteness directly
from the string. Change all callers.
(message3_nolog): Don't set message_enable_multibyte since set_message
will reset it anyway.
(message1, message1_nolog): Use message3.
(vmessage): Use a stack allocated buffer rather than f->message_buf.
(with_echo_area_buffer): Remove last two arguments. Update all callers.
(set_message): Drop all but the second arg, which has to be a string.
(set_message_1): Simplify now that we know that a1 is NULL and the
second arg is a string.
* src/frame.h (struct frame): Remove `message_buf' field.
Use glyphs_initialized_p instead.
(FRAME_MESSAGE_BUF): Remove macro.
* src/w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
* src/lisp.h (message2, message2_nolog): Remove declarations.
(message3, message3_nolog): Update declarations.
* src/keyboard.c (read_char_minibuf_menu_text)
(read_char_minibuf_menu_width): Remove vars.
(read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
to correctly handle multibyte strings.
* src/frame.c (delete_frame): Don't free message_buf any more.
* src/editfns.c (message_text, message_length): Remove vars.
(Fmessage_box): Don't copy the Lisp string's bytes any longer.
* src/fileio.c (auto_save_error): Use message3 instead of message2.
* src/dispnew.c (adjust_frame_message_buffer): Remove function.
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.
Dmitry Antipov [Tue, 22 Jan 2013 11:41:21 +0000 (15:41 +0400)]
* xdisp.c (mark_window_display_accurate): Simplify the loop
assuming that the only one of vchild, hchild or buffer window
slots is non-nil. Call mark_window_display_accurate_1 for
the leaf windows only.
(mark_window_display_accurate_1): Always assume leaf window.
Adjust comment.
Dmitry Antipov [Mon, 21 Jan 2013 17:01:09 +0000 (21:01 +0400)]
* fileio.c (Finsert_file_contents): Revert code introduced at
2013-01-18 in favor of the simpler and generally better fix.
Save stack space by removing 'buffer' and reusing 'read_buf'
where appropriate.
Michael Albinus [Mon, 21 Jan 2013 09:49:43 +0000 (10:49 +0100)]
Improve XEmacs compatibility.
* net/tramp.el (tramp-replace-environment-variables): Make it a defun.
* net/tramp-adb.el (top): Require `time-date'.
(tramp-adb-ls-output-time-less-p): Use `tramp-time-less-p'.
(tramp-adb-handle-copy-file, tramp-adb-handle-rename-file): Use
`tramp-file-name-handler'.
(tramp-adb-maybe-open-connection): Use
`tramp-compat-set-process-query-on-exit-flag'.
* net/tramp-sh.el (tramp-sh-handle-file-acl): Use
`tramp-compat-funcall'.
* net/tramp-smb.el (tramp-smb-handle-file-acl): Use `looking-at' and
`tramp-compat-funcall'.
Glenn Morris [Sun, 20 Jan 2013 02:39:59 +0000 (18:39 -0800)]
profiler.el tweaks
* profiler.el (profiler-running-p): New function.
(profiler-cpu-profile): Use profiler-running-p.
(profiler-report-mode-map): Add some more menu entries.
Paul Eggert [Sat, 19 Jan 2013 22:12:27 +0000 (14:12 -0800)]
* trouble.texi (Crashing): Suggest -p for recent addrline.
Without it, I don't see function names. Older addrlines will die
out sooner or later, so tailor the suggestion to recent addrline
and put in a comment about older ones.
Eli Zaretskii [Sat, 19 Jan 2013 20:04:33 +0000 (22:04 +0200)]
Fix crashes with lots of overlays.
src/editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
segfault when there are lots of overlays.
src/buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
when there are lots of overlays. See
http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
for the details and a way to reproduce.
Paul Eggert [Sat, 19 Jan 2013 18:58:40 +0000 (10:58 -0800)]
* fileio.c: Use O_APPEND to append.
This corresponds better to the natural interpretation of "append",
and avoids the need to open the output file twice, or to invoke
lseek when APPEND is neither nil nor a number.
This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
(Fwrite_region): Simplify. Use O_APPEND instead of opening the
file possibly twice, and lseeking to its end; this avoids the
need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC
at the same time: the combination is never needed and apparently
it doesn't work with DOS_NT.
* image-mode.el (image-next-file, image-previous-file): New commands.
(image-mode-map): Bind them to n and p.
(image-mode--images-in-directory): New helper function.
Chong Yidong [Sat, 19 Jan 2013 10:34:07 +0000 (18:34 +0800)]
* image-mode.el (image-mode-fit-frame): Add a frame argument.
Suggested by Drew Adams. Handle window decorations;
save and restore the old window configuration.