Bastien Guerry [Mon, 6 Jan 2014 20:54:37 +0000 (21:54 +0100)]
Fix Bug#16183 about `global-hl-line-sticky-flag'.
* hl-line.el (global-hl-line-overlay): Make a local variable.
(global-hl-line-overlays): New variable to store all overlays.
(global-hl-line-mode): Don't delete overlays from the current
buffer when `global-hl-line-sticky-flag' is non-nil.
(global-hl-line-highlight): Add new overlays to
`global-hl-line-overlays'.
(global-hl-line-unhighlight-all): New function to delete all
overlays when turning off `global-hl-line-mode'.
* net/eww.el (eww-list-histories,eww-history-browse): Fixup.
(eww-history-quit): Delete and use quit-window.
(eww-history-kill): Delete, because it doesn't work well and
not necessary.
(eww-history-mode-map): Delete some keys and add easy-menu.
Paul Eggert [Sun, 5 Jan 2014 02:56:08 +0000 (18:56 -0800)]
Spelling fixes.
* lib-src/Makefile.in (regex.o): Remove reference to no-longer-used macros
CONFIG_BROKETS and INHIBIT_STRING_HEADER. "BROKETS" was a
misspelling anyway....
* src/nsterm.h (updateCollectionBehavior): Rename from
updateCollectionBehaviour. All uses changed.
Paul Eggert [Sun, 5 Jan 2014 00:55:29 +0000 (16:55 -0800)]
Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
Problem and proposed patch reported by Ulrich Mueller;
this patch uses a somewhat-different approach.
* configure.ac (SETFATTR): New variable.
* src/Makefile.in (SETFATTR): New macro.
(temacs$(EXEEXT)): Use it.
Martin Rudalics [Sat, 4 Jan 2014 09:31:30 +0000 (10:31 +0100)]
Fix maximization behavior on Windows (Bug#16300).
Fix maximization behavior on Windows (Bug#16300).
* w32fns.c (w32_fullscreen_rect): Don't handle
FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
* w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
of SetWindowPos. Restore last placement also when leaving
FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
but the FULLSCREEN_BOTH case.
Paul Eggert [Fri, 3 Jan 2014 06:47:27 +0000 (22:47 -0800)]
Port to C89.
* data.c (arithcompare_driver):
* fileio.c (Fcar_less_than_car):
* fns.c (internal_equal):
* frame.c (delete_frame):
* lisp.h (enum More_Lisp_Bits):
* lread.c (read1):
Avoid C99 constructs that don't work in C89.
* data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
to port to C89, which doesn't have 'long long'.
(count_trailing_zero_bits): Use them.
Chong Yidong [Fri, 3 Jan 2014 05:37:58 +0000 (13:37 +0800)]
Remove the dynamic-docstring-function feature.
* emacs-lisp/advice.el (ad--make-advised-docstring): Change args.
Ignore function-documentation property when getting documentation.
(ad-activate-advised-definition): Use function-documentation
generate the docstring.
(ad-make-advised-definition): Don't call
ad-make-advised-definition-docstring.
(ad-make-advised-definition-docstring, ad-advised-definition-p):
Delete functions.
* emacs-lisp/nadvice.el (advice--make-docstring): Change args.
(advice--docstring): Delete variable.
(advice--make-1): Leave the docstring empty.
(advice-add): Use function-documentation for advised docstring.
* progmodes/sql.el (sql-help): Use function-documentation instead
of dynamic-docstring-function property. No need to autoload now.
(sql--help-docstring): New variable.
(sql--make-help-docstring): Use it.
Stefan Monnier [Fri, 3 Jan 2014 05:10:52 +0000 (00:10 -0500)]
* lisp/ielm.el (ielm-tab): Retarget.
(ielm-map): Use ielm-tab for tab.
(ielm-complete-filename): Use comint-filename-completion.
(ielm-complete-symbol): Remove.
(inferior-emacs-lisp-mode): Use lisp-completion-at-point instead and
remove ielm-tab from completion-at-point-functions.
* mail/rmail.el (rmail-get-coding-function): Variable.
(rmail-get-coding-system): Use it.
* mail/rmail.el (rmail-make-in-reply-to-field):
Add parens in message-id.
* mail/rmailmm.el (rmail-mime-message-p): Moved to rmail.el.
* mail/rmail.el (rmail-mime-message-p): Moved from rmailmm.el.
(rmail-epa-decrypt): Turn off mime processing.
Martin Rudalics [Thu, 2 Jan 2014 15:58:48 +0000 (16:58 +0100)]
Further adjust frame/window scrollbar width calculations.
* window.c (apply_window_adjustment): Set
windows_or_buffers_changed.
(Fwindow_scroll_bars): Return actual scrollbar width.
* xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
For non-toolkit builds again use 14 as minimum width and set
FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
* xterm.c (XTset_vertical_scroll_bar): Take width from
WINDOW_SCROLL_BAR_AREA_WIDTH.
(x_new_font): Rename wid to unit. Base calculation of new
scrollbar width on toolkit used and make it analogous to that of
x_set_scroll_bar_default_width.
* w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
(Fx_create_frame): Call x_set_scroll_bar_default_width instead
of GetSystemMetrics.
* w32term.c (w32_set_vertical_scroll_bar): Take width from
WINDOW_SCROLL_BAR_AREA_WIDTH.
(x_new_font): Make it correspond to changes in xterm.c.
Eli Zaretskii [Wed, 1 Jan 2014 17:44:48 +0000 (19:44 +0200)]
Fix bug #16265 with buffer caches when modifying text in indirect buffers.
src/search.c (newline_cache_on_off, find_newline): In indirect
buffers, use the newline cache of the base buffer.
src/insdel.c (invalidate_buffer_caches): If BUF is an indirect
buffer, invalidate the caches of its base buffer.
src/indent.c (width_run_cache_on_off, compute_motion): In indirect
buffers, use the width-run cache of the base buffer.
src/xdisp.c (redisplay_window): When the window displays an indirect
buffer, and the character widths in the display table have
changed, invalidate the width-run cache of the corresponding base
buffer.
src/fileio.c (Finsert_file_contents): When invalidating the newline
cache, consider the case of inserting into indirect buffer.
src/bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
In indirect buffers, use the paragraph cache of the base buffer.
Fabrice Popineau [Tue, 31 Dec 2013 16:01:34 +0000 (18:01 +0200)]
Minor fixes for MinGW64 build.
configure.ac (canonical, C_SWITCH_SYSTEM): Support a 64-bit
MinGW64 build on MS-Windows.
nt/inc/ms-w32.h (sys_kill): Fix prototype.
src/w32term.c (w32_initialize): Use LCID and LOWORD.
src/w32proc.c (create_child): Use pid_t for 5th argument.
(IsValidLocale): Don't provide prototype for MinGW64.
(Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
(Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
src/w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
MinGW64 doesn't support.
src/lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
Fabrice Popineau [Tue, 31 Dec 2013 15:00:43 +0000 (17:00 +0200)]
Fall back on SetNamedSecurityInfo if SetFileSecurity fails in acl_set_file.
src/w32.c (set_named_security_info): New function.
(acl_set_file): Fall back on set_named_security_info if
set_file_security fails. Fixes rare failures in backups.
(g_b_init_set_named_security_info_w)
(g_b_init_set_named_security_info_a): New static variables.
(globals_of_w32): Initialize them to zero.
(set_named_security_info): Set them to non-zero if the
corresponding API is available.
(SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc): New
function typedefs.
Martin Rudalics [Tue, 31 Dec 2013 09:48:54 +0000 (10:48 +0100)]
Some more fixes following pixelwise resize changes including one for Bug#16306.
* gtkutil.c (x_wm_set_size_hint): Have size hints respect value
of frame_resize_pixelwise.
* widget.c (pixel_to_text_size): New function.
(update_wm_hints): Have size hints respect value of
frame_resize_pixelwise.
(EmacsFrameResize): Alway process resize requests pixelwise.
* window.c (grow_mini_window): Make sure mini window is at least
one line tall.
* xdisp.c (display_menu_bar): Make sure menubar extends till
right end of frame.
* xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
(x_set_tool_bar_lines): Calculate pixelwise.
* xterm.c (x_wm_set_size_hint): Have size hints respect value of
frame_resize_pixelwise.
Paul Eggert [Sun, 29 Dec 2013 18:18:45 +0000 (10:18 -0800)]
Plain copy-file no longer chmods an existing destination.
* doc/lispref/files.texi (Changing Files): Document this.
* etc/NEWS: Document this.
* src/fileio.c (realmask): Now a static var, not a local.
(barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
Remove arg STATPTR. All uses changed.
(Fcopy_file): Do not alter permissions of existing destinations,
unless PRESERVE-PERMISSIONS (renamed from
PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
Avoid race when testing for existing destinations and for
when input and output files are the same.
If changing the group fails, adjust both default and
preserved permissions so that access is not granted to the
wrong group.
(Fset_default_file_modes, init_fileio): Update realmask.
(Fdefault_file_modes): Use realmask instead of calling umask.