Jan Djärv [Sat, 7 Dec 2013 14:21:53 +0000 (15:21 +0100)]
Handle pixelwise resize changes in NS port.
* src/nsfns.m (Fx_create_frame): Call change_frame_size twice as per
comment in xfns.c. Change to pixelwise call.
* src/nsterm.m (x_set_window_size): Change parameters rows/cols to
height/width. row/cols are locals.
Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
(updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
(windowWillResize): Remove gsextra. Calculate extra as in
updateFrameSize.
(x_new_font): Don't change frame size if fullscreen. Change
size pixelwise.
Dmitry Antipov [Fri, 6 Dec 2013 05:49:05 +0000 (09:49 +0400)]
* xterm.c (input_signal_count): Remove.
(x_dispatch_event): Define unconditionally.
(x_make_frame_visible): Process X events until the frame
is really visible (Bug#16027).
* xterm.h (x_dispatch_event): Declare unconditionally.
Dmitry Gutov [Fri, 6 Dec 2013 04:22:08 +0000 (06:22 +0200)]
Fix Bug#15874
* lisp/progmodes/ruby-mode.el (ruby-mode-syntax-table): Don't modify
syntax for `?'.
(ruby-expr-beg): Expect that `!' will have syntax class "symbol"
where appropriate already.
(ruby-syntax-propertize-function): Propertize `?' and `!' at the
end of method names.
Juri Linkov [Fri, 6 Dec 2013 00:55:20 +0000 (02:55 +0200)]
* lisp/isearch.el (isearch--saved-overriding-local-map): New internal variable.
(isearch-mode): Set it to the initial value of `overriding-terminal-local-map'.
(isearch-pre-command-hook): Compare `overriding-terminal-local-map'
with `isearch--saved-overriding-local-map'.
Ted Zlatanov [Thu, 5 Dec 2013 16:04:53 +0000 (11:04 -0500)]
eww: add command to view page source
* net/eww.el (eww-current-source): New variable to store page
source.
(eww-display-html, eww-mode, eww-save-history)
(eww-restore-history): Use it.
(eww-view-source): New command to view page source.
Opportunistically uses `html-mode' to highlight the buffer.
(eww-mode-map): Install it.
Stefan Monnier [Wed, 4 Dec 2013 18:46:47 +0000 (13:46 -0500)]
* src/window.c (window_scroll): Mark window for redisplay.
(scroll_command, Fscroll_other_window): Don't cause redisplay now that
window_scroll takes care of it.
(Fset_window_point, Fdelete_other_windows_internal)
(set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
(Fsplit_window_internal, Fdelete_window_internal)
(Fresize_mini_window_internal, Fset_window_configuration)
(apply_window_adjustment): Use fset_redisplay and wset_redisplay to
cause redisplay instead of forcing a complete redisplay.
* src/xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
we're only affecting the selected_window.
Eli Zaretskii [Wed, 4 Dec 2013 16:58:05 +0000 (18:58 +0200)]
Fix bug #16043 with crashes when displaying new bidi control characters.
src/bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
directional control characters. Update type and category
determination according to the UBA from Unicode v6.3.
(bidi_category_t): New category EXPLICIT_FORMATTING.
src/dispextern.h (bidi_type_t): Update to include new bidirectional
properties introduced with Unicode v6.3.
admin/unidata/unidata-gen.el (unidata-prop-alist): Update bidi-class
to include the new isolate-related classes introduced with Unicode
v6.3.
(unidata-encode-val): Accept an additional optional argument, a
warning message to emit when UnicodeData.txt defines bidi-class
values that are not in unidata-prop-alist. Add a comment
explaining what should maintainers do if/when such a warning ever
appears.
(unidata-gen-table): Call unidata-encode-val with 3rd arg non-nil
when generating uni-bidi.el.
Michael Albinus [Wed, 4 Dec 2013 14:10:09 +0000 (15:10 +0100)]
* net/dbus.el (dbus-byte-array-to-string): Accept also byte arrays
in D-Bus type syntax.
(dbus-unescape-from-identifier): Use `byte-to-string' in order to
preserve unibyte strings. (Bug#16048)
Dmitry Gutov [Wed, 4 Dec 2013 00:37:33 +0000 (02:37 +0200)]
Remember log-edit comment when the buffer is killed
* lisp/vc/log-edit.el (log-edit-add-new-comment): Rename to
`log-edit-remember-comment', make argument optional. Adjust all
callers.
(log-edit-mode): Add `log-edit-remember-comment' to
`kill-buffer-hook' locally.
(log-edit-kill-buffer): Don't remember comment explicitly since
the buffer is killed anyway.
Paul Eggert [Tue, 3 Dec 2013 21:37:41 +0000 (13:37 -0800)]
Minor integer overflow fixes.
* window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
This improves on the previous fix to this function.
(window_resize_check): When summing up pixel counts, don't rely on
undefined behavior if the sum overflows.
Paul Eggert [Tue, 3 Dec 2013 02:27:10 +0000 (18:27 -0800)]
Minor integer overflow fixes.
* window.c (Fset_window_new_pixel, grow_mini_window):
* xdisp.c (Fwindow_text_pixel_size):
Avoid undefined behavior on signed integer overflow.
* xfns.c (x_set_mouse_color):
Check that drag shape fits in 'unsigned', since that's what X wants.
Dmitry Gutov [Mon, 2 Dec 2013 22:13:51 +0000 (00:13 +0200)]
Support the new log-edit behavior in vc-git-log-edit-toggle-amend
* lisp/vc/log-edit.el (log-edit-set-header): Extract from
`log-edit-toggle-header'.
(log-edit-extract-headers): Separate the summary, when extracted
from header, from the rest of the message with an empty line.
* lisp/vc/vc-git.el (vc-git-log-edit-toggle-amend): Move the summary
line, if present, to the Summary header.
Eli Zaretskii [Mon, 2 Dec 2013 17:28:17 +0000 (19:28 +0200)]
Improve reporting of fatal exception on MS-Windows, to aid debugging #15994.
src/w32fns.c (my_exception_handler): New function.
(globals_of_w32fns): Set it up as the unhandled exception
handler. Initialize exception code and address to zeros.
(emacs_abort): If the exception code and address are available,
print them at the beginning of the backtrace. Fix the format of
printing addresses (was producing 0x0x12345678 on XP).
Helmut Eller [Mon, 2 Dec 2013 14:45:22 +0000 (09:45 -0500)]
* lisp/emacs-lisp/debug.el (debugger-toggle-locals): New command.
(debugger-mode-map): Bind it.
(debugger--backtrace-base): New function.
(debugger-eval-expression): Use it.
(debugger-frame-number): Skip local vars when present.
(debugger--locals-visible-p, debugger--insert-locals)
(debugger--show-locals, debugger--hide-locals): New functions.
* src/eval.c (Fbacktrace__locals): New function.
(syms_of_eval): Defsubr it.
Michael Albinus [Mon, 2 Dec 2013 13:52:23 +0000 (14:52 +0100)]
* net/tramp-sh.el (tramp-remote-process-environment): Do not set "LC_ALL".
(tramp-get-remote-locale): New defun.
(tramp-open-connection-setup-interactive-shell): Use it.
Dmitry Gutov [Mon, 2 Dec 2013 03:03:40 +0000 (05:03 +0200)]
Fix minor log-edit-show-files annoyances
* lisp/vc/log-edit.el (log-edit-kill-buffer): Move the use of
`save-selected-window' to `log-edit-hide-buf'. This makes
`log-edit-show-files' idempotent.
(log-edit-show-files): Mark the new window as dedicated.
Dmitry Gutov [Mon, 2 Dec 2013 02:26:07 +0000 (04:26 +0200)]
Install the actual changes missing in previous revision
* lisp/vc/log-edit.el (log-edit-mode-map): Add binding for
`log-edit-kill-biffer'.
(log-edit-hide-buf): Add a FIXME comment.
(log-edit-add-new-comment): New function, extracted from
`log-edit-done'.
(log-edit-done, log-edit-add-to-changelog): Use it.
(log-edit-kill-buffer): New command.
Dmitry Gutov [Mon, 2 Dec 2013 02:24:31 +0000 (04:24 +0200)]
Implement log-edit-kill-buffer
* vc/log-edit.el (log-edit-mode-map): Add binding for
`log-edit-kill-biffer'.
(log-edit-hide-buf): Add a FIXME comment.
(log-edit-add-new-comment): New function, extracted from
`log-edit-done'.
(log-edit-done, log-edit-add-to-changelog): Use it.
(log-edit-kill-buffer): New command.
* xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
* xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
fringe background extension.
(x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
because they are now always the same as `left' and `width',
respectively. Remove code for the case that `width' and
`sb_width' are different.
Allow customizing the checkboxes in eww
* net/shr.el (shr-tag-table): Fix comment typo.
* net/eww.el (eww-text-input-types): : New const.
(eww-process-text-input): Treat input types in
`eww-text-input-types' as text.
* net/shr.el (shr-tag-video): Display content for video if no
poster is available.
(shr-tag-audio): Add support for <audio> tag.
* net/eww.el (eww-use-external-browser-for-content-type): New
variable.
(eww-render): Handle `eww-use-external-browser-for-content-type'.
Use \\` to match beginning of string instead of ^.
(eww-browse-with-external-browser): Provide optional URL parameter.
(eww-render): Set `eww-current-title' back to "".
* net/shr.el (shr-prefer-media-type-alist): : New customizable
variable.
(shr--get-media-pref): New function.
(shr--extract-best-source): New function.
(shr-tag-video, shr-tag-audio): Use `shr--extract-best-source' when
no :src tag was specified.
* net/eww.el (eww-form-checkbox-selected-symbol): New
customizable variable.
(eww-form-checkbox-symbol): New customizable variable.
(eww-form-checkbox): Use `eww-form-checkbox-selected-symbol' and
`eww-form-checkbox-symbol'.
(eww-toggle-checkbox): Use `eww-form-checkbox-selected-symbol' and
`eww-form-checkbox-symbol'.
Allow preferring some media types over others
* net/shr.el (shr-prefer-media-type-alist): : New customizable
variable.
(shr--get-media-pref): New function.
(shr--extract-best-source): New function.
(shr-tag-video, shr-tag-audio): Use `shr--extract-best-source' when
no :src tag was specified.
Option to always use external-browser for certain content.
* net/eww.el (eww-use-external-browser-for-content-type): New
variable.
(eww-render): Handle `eww-use-external-browser-for-content-type'.
Use \\` to match beginning of string instead of ^.
(eww-browse-with-external-browser): Provide optional URL parameter.
Treat HTML5 input types as text
* net/eww.el (eww-text-input-types): : New const.
(eww-process-text-input): Treat input types in
`eww-text-input-types' as text.
Don't reload eww pages when browsing to different #targets
* net/eww.el (eww-follow-link): New command to avoid reloading
pages when we follow #target links.
Dmitry Gutov [Sun, 1 Dec 2013 04:13:50 +0000 (06:13 +0200)]
Apply the initial log-edit tweaks discussed at emacs-devel
* .dir-locals.el: (log-edit-move): Add the "Author: " header.
* lisp/vc/log-edit.el (log-edit-mode-map): Add binding for
`log-edit-beginning-of-line'.
(log-edit-setup-add-author): New user option.
(log-edit-beginning-of-line): New command.
(log-edit): Move major mode call above the contents setup so that
the local variable values are already applied.
(log-edit): Only insert "Author: " when
`log-edit-setup-add-author' is non-nil.
(log-edit): When SETUP is non-nil, position point after ": "
instead of point-min.
Dani Moncayo [Sat, 30 Nov 2013 15:42:13 +0000 (16:42 +0100)]
msys-to-w32: Do not translate paths starting with %emacs_dir%.
* build-aux/msys-to-w32 (w32pathlist): Do not translate paths
starting with %emacs_dir%.