1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

128968 Commits

Author SHA1 Message Date
Noam Postavsky
861824dbec Fix find-library-name for load-history entries with nil FILE-NAME (Bug#26355)
* lisp/emacs-lisp/find-func.el (find-library--from-load-history):
Rename from find-library--from-load-path.  Check for `load-history'
entries with nil FILE-NAMEs.  Simplify by not double
checking for suffixes and making use of `locate-file'.
2017-04-18 07:54:28 -04:00
Alan Third
a13eaddce2 Use vfork if possible on Darwin (bug#26397)
Co-authored-by: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>

* src/conf_post.h (HAVE_WORKING_VFORK): Don't undef.
(vfork): Don't define.
* src/process.c (create_process) [DARWIN_OS]: Use fork if pty_flag is
set, otherwise vfork.
* src/callproc.c (call_process) [DARWIN_OS]: Use TIOCNOTTY to detach
the controlling terminal instead of setsid.
2017-04-18 11:42:30 +01:00
Fran Litterio
4ad6be65f6 Small erc-kill-channel fix (bug#23700)
* lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target.
2017-04-17 20:30:40 -04:00
Glenn Morris
2d42bf7f5e ediff: use user-error rather than debug-ignored-errors
* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-17 20:16:15 -04:00
Glenn Morris
2e3a33659f mh-e: use user-error rather than debug-ignored-errors
* lisp/mh-e/mh-alias.el (mh-alias-grab-from-field):
* lisp/mh-e/mh-utils.el (mh-get-msg-num): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-17 20:10:28 -04:00
Glenn Morris
d0397f4a57 ispell.el: use user-error rather than debug-ignored-errors
* lisp/textmodes/ispell.el (ispell-get-word): Use user-error.
(debug-ignored-errors): No longer modify.
2017-04-17 20:09:27 -04:00
Paul Eggert
d5ead735a0 ; Spelling fix 2017-04-17 11:22:52 -07:00
Paul Eggert
b8e0d203fe * src/xterm.c (x_fill_rectangle): Now static. 2017-04-17 11:14:40 -07:00
Paul Eggert
932698b789 Tighten recently-added UTF-8 check
* src/coding.c (encode_coding_utf_8): Now extern.
* src/terminal.c (terminal_glyph_code) [HAVE_STRUCT_UNIPAIR_UNICODE]:
Check for UTF-8, not just for multibyte.
2017-04-17 10:20:39 -07:00
David Engster
09eaf661eb xml: Properly handle symbol-qnames for attribute parsing
* lisp/xml.el (xml-parse-attlist): Do not strip 'symbol-qnames from
  xml-ns argument (reverts aea67018) (Bug#26533).
  (xml-maybe-do-ns): Properly handle default namespace by not
  interning new symbol when 'special' flag is set.

* tests/lisp/xml-tests.el (xml-parse-test--namespace-attribute-qnames)
  (xml-parse-namespace-attribute-qnames): Add test for Bug#26533.
2017-04-17 17:17:00 +02:00
Paul Eggert
630df0587e * src/lisp.h (STRING_SET_CHARS): Simplify assertion. 2017-04-17 07:56:29 -07:00
Eli Zaretskii
edc63bf94f Fix assertion violations when displaying thread-related error
* src/process.c (Faccept_process_output): Don't assume a thread's
name is always a string.
2017-04-17 09:47:39 +03:00
Paul Eggert
4712229552 dired ‘M’ should not complain about ‘.’ and ‘..’
* lisp/dired-aux.el (dired-do-redisplay):
Allow redisplay of ‘.’ and ‘..’ (Bug#26528).
2017-04-16 23:37:29 -07:00
Paul Eggert
750721c394 Remove unused coding enums
* src/coding.h (enum coding_system_type, enum end_of_line_type):
Remove; unused.
2017-04-16 23:07:55 -07:00
Paul Eggert
1cad610301 Work around bug with unibyte Linux consoles
* src/terminal.c (terminal_glyph_code): Skip the UTF-8 stuff if
the terminal's coding system is unibyte (Bug#26396).
2017-04-16 22:50:39 -07:00
Christian Garbs
c68cce94c4
; Fix typo in error messages (Bug#26034)
Copyright-paperwork-exempt: yes
2017-04-17 07:07:12 +03:00
Teemu Likonen
8750a4546a
Fix org-agenda's command for calendar-lunar-phases
Function org-agenda-phases-of-moon tries to call a non-existing
function calendar-phases-of-moon. The correct function is
calendar-lunar-phases.
2017-04-16 22:06:48 +03:00
Michael Albinus
8d96feae07 Tuning for `separate' Tramp syntax
* lisp/net/tramp.el (tramp-method-regexp): Fix it for `separate' syntax.
(tramp-completion-file-name-regexp-separate): Simplify.

* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect-separate):
Extend test.
2017-04-16 16:51:24 +02:00
Alan Mackenzie
92879a1b03 Fix bug #26529: C-h k errors with a lambda function bound to a key.
* lisp/help-fns.el (help-fns--signature, describe-function-1): Check
`function' is a symbol before trying to get property `reader-construct' from
it.
2017-04-16 10:01:09 +00:00
Simen Heggestøyl
bdd0c8600f Fix highlighting of short selectors in CSS mode
* lisp/textmodes/css-mode.el (css--font-lock-keywords): Highlight
selectors where the part before a colon is only one character long,
such as `a:hover'.
2017-04-16 11:55:33 +02:00
Eli Zaretskii
58430f2996 Fix redisplay performance problems with some fonts
* src/font.c (font_list_entities): Revert part of the changes
introduced on Apr 2, 2014 to fix bug#17125.  It turns out having
zero_vector in the font-cache is an important indication that
cannot be removed.  (Bug#21028)
2017-04-16 10:43:22 +03:00
Eli Zaretskii
f3b24e90dc Add assertion to STRING_SET_CHARS
* src/lisp.h (STRING_SET_CHARS): Add an assertion and commentary
to prevent incorrect usage.  For details, see this discussion:
http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00412.html.
2017-04-16 10:27:23 +03:00
Eli Zaretskii
1bf7ca623b Avoid compilation warnings on MS-Windows
* src/w32term.c (w32_read_socket): Avoid compiler warnings about
parentheses around assignment.
* src/w32fns.c (w32_createwindow): Remove unused variable
dwStyle.  Use "|=" where appropriate.
2017-04-16 10:12:42 +03:00
Paul Eggert
0ef7f64407 Merge from gnulib
This incorporates:
2017-04-14 intprops: try to avoid tickling similar bugs
2017-04-14 intprops: port to Oracle Studio 12.3 x86
* doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib.
2017-04-15 22:23:05 -07:00
Martin Rudalics
23d3eeb798 Fix bugs in with-displayed-buffer-window' and fit-window-to-buffer'
* lisp/window.el (with-displayed-buffer-window): When a
'window-height' action alist entry specifies a function, call
`temp-buffer-window-show' with a '(window-height . t)' dummy
entry so `window--try-to-split-window' will bind
`window-combination-limit' to t and that function does not
resize any other window but the one we split this one off
(Bug#25055, Bug#25179).
(fit-window-to-buffer): Call `window-max-delta' with NOUP t so
we steal space only from windows in the same combination.
Stealing space from other windows would not allow us to return
that space later when this window is deleted (Bug#25055,
Bug#25179).
2017-04-15 16:16:26 +02:00
Glenn Morris
28718c4449 Avoid userlock queries hanging forever in batch mode
* lisp/userlock.el (ask-user-about-lock)
(ask-user-about-supersession-threat): Abort in batch mode.
2017-04-14 21:18:07 -04:00
Paul Eggert
e6750596ef ; Spelling and minor wording fixes 2017-04-14 12:42:31 -07:00
Martin Rudalics
fc05d4fec9 Fix segfault when calling frame_ancestor_p (Bug#26493)
* src/xterm.c (handle_one_xevent): Check that hf was not reset
before calling frame_ancestor_p (Bug#26493).
2017-04-14 12:14:09 +02:00
Martin Rudalics
96644ed496 A few additional copy-edits in documentation of frames
* doc/lispref/frames.texi (Frame Layout)
(Implied Frame Resizing): Windows -> MS-Windows.
(Deleting Frames): Fix typo.
2017-04-14 09:26:03 +02:00
Glenn Morris
86e512ed10 Use user-error for some ert.el errors
* lisp/emacs-lisp/ert.el (ert-read-test-name, ert-delete-all-tests)
(ert-results-find-test-at-point-other-window, ert-describe-test):
Use user-error.
2017-04-13 21:17:09 -04:00
Glenn Morris
a855473b70 Use user-error for customize's "invalid face" error
* lisp/cus-edit.el (customize-face): Use user-error.
(debug-ignored-errors): No more need to add "Invalid face".
2017-04-13 20:17:08 -04:00
Glenn Morris
e8adf68824 Remove duplicate lisp-eval-defun definition
* lisp/emacs-lisp/lisp-mode.el (lisp-eval-defun):
Autoload rather than defining a stub.
2017-04-13 20:15:34 -04:00
Glenn Morris
393228bd7a * lisp/Makefile.in (check-defun-dups): Ignore obsolete files. 2017-04-13 20:14:01 -04:00
Glenn Morris
ad128fee43 Create generated lisp files before main loaddefs.el
This should improve reproducibility of lisp/loaddefs.el.
* lisp/Makefile.in (gen-lisp): New phony target.
($(lisp)/loaddefs.el, compile-main): Depend on gen-lisp.
* src/Makefile.in ($(leimdir)/leim-list.el): Depend on all of ../leim.
* lisp/cedet/semantic.el (semantic-mode):
* lisp/cedet/semantic/fw.el (top-level):
* lisp/emacs-lisp/eieio-core.el (top-level):
Robustify to generated input files maybe not yet existing.
2017-04-13 20:12:02 -04:00
Paul Eggert
8201263765 Fix minor quoting issues in Makefile.in
* Makefile.in (install-arch-dep, uninstall):
Quote EMACS and EMACS_NAME more consistently.
2017-04-13 15:37:46 -07:00
Glenn Morris
900caf992e * Makefile.in (install-etc): Use existing Makefile variables. 2017-04-13 13:56:02 -04:00
Eli Zaretskii
030c4f94b6 Minor copyedits of recent changes in documentation
* doc/lispref/frames.texi (Frame Layout, Frame Position)
(Frame Size, Frame Interaction Parameters, Input Focus)
(Raising and Lowering, Child Frames): Improve wording and indexing.
* doc/emacs/cmdargs.texi (Borders X): Improve indexing.
2017-04-13 20:52:30 +03:00
Glenn Morris
dbae41896c Small src/Makefile simplification
* src/Makefile.in ($(lispsource)/international/ucs-normalize.elc)
($(lispsource)/term/ns-win.elc): Combine rules.
2017-04-13 13:44:35 -04:00
Martin Rudalics
a61fa4af28 ; Update NEWS for frame and window changes 2017-04-13 18:59:37 +02:00
Simen Heggestøyl
02220c174e Add grid layout module to CSS property list
* lisp/textmodes/css-mode.el (css-property-alist)
(css-value-class-alist): Add new properties and value classes from CSS
Grid Layout Module.
2017-04-13 18:54:19 +02:00
Martin Rudalics
7cc613dc68 Describe recent frame and window changes in manuals
* doc/emacs/emacs.texi (Top):
* doc/emacs/cmdargs.texi (Borders X): Clearly separate the terms
"outer border" (for the X border which can be set from within
Emacs) and "external border" (for the border which is added by
the window manager).
* doc/lispref/display.texi (Tooltips): Clarify slightly.
* doc/lispref/elisp.texi (Top): Update node and section names.
* doc/lispref/frames.texi (Frames): Describe difference between
top-level and child frames.
(Frame Layout): Describe outer border.  Add more details about
how Emacs obtains the outer size and position of a frame and
about menu bar/tool bar wrapping.  Add references to new frame
parameters.
(Size and Position): Remove subsection.
(Frame Position): New subsection excerpted from the earlier Size
and Position subsection.  Clarify positioning concepts and
some of their shortcomings.  Describe `move-frame-functions'.
(Frame Size): New subsection excerpted from the earlier Size
and Position subsection.  Describe how to track frame size
changes and the new function `frame-size-changed-p'.
(Position Parameters): Describe child frame positioning.  Warn
about negative offsets.  Describe 'z-group' parameter.
(Size Parameters): Describe 'text-pixels' specification
facility and new 'min-width' and 'min-height' parameters.
(Layout Parameters): Clarify description of 'tool-bar-lines' and
'menu-bar-lines' parameters.
(Frame Interaction Parameters): New subsubsection describing
'parent-frame', 'delete-before', 'mouse-wheel-frame' and
'no-other-frame' parameters.
(Management Parameters): Describe 'skip-taskbar',
'no-focus-on-map', 'no-accept-focus', 'undecorated' and
'override-redirect' parameters.
(Deleting Frames): Describe handling of 'delete-before'
parameter and child frames for `delete-frame' and
`delete-other-frames'.
(Finding All Frames): Describe `frame-list-z-order' and handling
of 'no-other-frame' parameter by `next-frame'.
(Minibuffers and Frames): Minor clarifications.
(Input Focus): Document `x-focus-frame'.  Clarify descriptions
of `focus-in-hook', `focus-out-hook' and `focus-follows-mouse'.
(Visibility of Frames): Describe mapping and how the visibility
of a parent frame affects that of its child frames.
(Raising and Lowering): Describe restacking of frames and
z-groups.
(Child Frames): New section.
* doc/lispref/windows.texi (Selecting Windows): Describe
additional semantics of NORECORD argument of `select-window' and
how `buffer-list-update-hook' can emulate a "select window
hook".
(Mouse Window Auto-selection): New section.
2017-04-13 17:45:12 +02:00
Damien Cassou
4e77ff0d45 Fix imenu--sort-by-position for non-pairs parameters (bug#26457)
* lisp/imenu.el (imenu--sort-by-position): Fix to accept lists beyond
  pairs.
* test/lisp/imenu-tests.el: Add 2 tests for `imenu--sort-by-position`.
2017-04-13 11:44:17 +02:00
Eli Zaretskii
88e012511a Avoid unnecessary regeneration of the entire loaddefs.el
* lisp/Makefile.in (autoloads .PHONY): Add commentary explaining
why $(lisp)/loaddefs.el is a dependency of '.PHONY'.
($(lisp)/loaddefs.el): Copy an existing loaddefs.el to
loaddefs.tmp before running 'batch-update-autoloads' on it, to
avoid slow regeneration of the full contents.  (Bug#26459)
Use 'move-if-change' instead of 'mv', to avoid producing a new
Emacs binary when not necessary.
2017-04-13 10:03:09 +03:00
Dmitry Gutov
6354e3c336 Handle indentation of nested ternary operators in JS
* lisp/progmodes/js.el (js--looking-at-operator-p):
Handle nested ternary operators.
2017-04-13 03:50:41 +03:00
Eli Zaretskii
2e4f4c9d48 Don't call 'kill-this-buffer' outside of menus
* lisp/simple.el (kill-current-buffer): New function.
(completion-list-mode-map): Use it instead of kill-this-buffer.
* lisp/type-break.el (type-break-mode):
* lisp/term/ns-win.el (global-map):
* lisp/progmodes/gdb-mi.el (gdb-memory-mode-map)
(gdb-disassembly-mode-map, gdb-frames-mode-map)
(gdb-locals-mode-map, gdb-registers-mode-map):
* lisp/org/org-mhe.el (org-mhe-follow-link):
* lisp/net/secrets.el (secrets-mode-map):
* lisp/net/eudc.el (eudc-mode-map):
* lisp/net/eudc-hotlist.el (eudc-hotlist-mode-map): Use
kill-current-buffer instead of kill-this-buffer.  (Bug#26466)
2017-04-12 23:14:20 +03:00
Martin Rudalics
c25005eda1 New internal-border face and args for select-window and x-focus-frame
Add `internal-border' face and handle it whenever clearing the
internal border.  If NORECORD equals the symbol
'mark-for-redisplay', `select-window' will not record the window
but still mark it for redisplay.  The new argument NOACTIVATE
for `x-focus-frame' tries to not activate FRAME when set.

* lisp/faces.el (internal-border): New face.
* lisp/mwheel.el (mwheel-scroll): Select window to scroll with
`mark-for-redisplay'.
* lisp/scroll-bar.el (scroll-bar-drag)
(scroll-bar-horizontal-drag, scroll-bar-scroll-down)
(scroll-bar-scroll-up, scroll-bar-toolkit-scroll)
(scroll-bar-toolkit-horizontal-scroll): Select window to scroll
with `mark-for-redisplay'.
* lisp/window.el (handle-select-window): When
`focus-follows-mouse' is not 'auto-raise' try to not activate
FRAME.
* src/dispextern.h (face_id): Add INTERNAL_BORDER_FACE_ID.
* src/frame.c (Fx_focus_frame): New argument NOACTIVATE.
* src/frame.h (x_focus_frame): Update extern declaration.
* src/gtkutil.c (xg_clear_under_internal_border): Remove
function.
(xg_frame_resized, xg_frame_set_char_size): Call
x_clear_under_internal_border.
(xg_tool_bar_callback): Adapt x_focus_frame call.
* src/gtkutil.h (xg_clear_under_internal_border): Remove
declaration.
* src/nsfns.m (x_focus_frame): Add argument NOACTIVATE.
* src/w32fns.c (x_clear_under_internal_border): Fill border
with internal-border background if specified.
* src/w32term.h (x_clear_under_internal_border): Add extern
declaration.
* src/w32term.c (x_after_update_window_line): Fill border
with internal-border background if specified.
(w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
(x_scroll_bar_clear, w32_read_socket): Call
x_clear_under_internal_border.
(x_focus_frame): New argument NOACTIVATE.
* src/window.c (select_window): Mark WINDOW for redisplay when
NORECORD equals 'mark-for-redisplay'.
(Fselect_window): Update doc-string.
(syms_of_window): Define Qmark_for_redisplay.
* src/xdisp.c (clear_garbaged_frames, echo_area_display)
(redisplay_internal): Call x_clear_under_internal_border.
* src/xfaces.c (lookup_basic_face): Handle `window-divider'
and `internal-border' faces.
(realize_basic_faces): Realize `internal-border' face.
(syms_of_xfaces): Define Qinternal_border.
* src/xfns.c (x_set_internal_border_width): Remove call for
xg_clear_under_internal_border.
(x_focus_frame): New argument NOACTIVATE.  When non-nil try to not
activate frame.
* src/xterm.c (x_fill_rectangle): No more static.
(x_clear_under_internal_border, x_after_update_window_line):
Fill border with internal-border background if specified.
(xt_horizontal_action_hook): Rewrite.
(handle_one_xevent): Call x_clear_under_internal_border.
* src/xterm.h (x_fill_rectangle): Add extern declaration.
2017-04-12 18:22:44 +02:00
Paul Eggert
8720f601e7 Port recent frame changes to --enable-gcc-warnings
* src/frame.c (next_frame, prev_frame):
Remove now-redundant assertions.
* src/frame.h (FOR_EACH_FRAME): Assume Vframe_list is nonempty.
2017-04-12 07:27:53 -07:00
Tak Kunihiro
88f43dc30c Scroll right and left using wheel-right and wheel-left.
These changes also make use of touchpad and trackpad (Bug#26347).

* doc/emacs/frames.texi (Mouse Commands): Document horizontal
scrolling using the mouse wheel.

* lisp/mwheel.el (mwheel-scroll): Respond to wheel-right and wheel-left.
(mwheel-tilt-scroll-p, mwheel-flip-direction)
(mwheel-scroll-left-function, mwheel-scroll-right-function): New
defcustoms.
(mouse-wheel-left-event, mouse-wheel-right-event): New variables,
events that calls wheel-left/right.

* etc/NEWS: Mention horizontal scrolling using the mouse wheel.
2017-04-12 16:29:35 +03:00
Eli Zaretskii
cc7a816936 * lisp/Makefile.in (autoloads-force): Fix usage of ".PHONY". 2017-04-12 12:01:48 +03:00
Martin Rudalics
3fdd3bb56c Add new frame parameters and associated functions
Add new frame parameters `undecorated', `override-redirect',
`parent-frame', `skip-taskbar', `no-focus-on-map',
`no-accept-focus', `z-group', `delete-before', `no-other-frame',
`mouse-wheel-frame', `min-width', `min-height'.  Add new
functions `frame-restack' and `frame-list-z-order'.

* lisp/cus-start.el (focus-follows-mouse): Adapt customization
type.
* lisp/frame.el (handle-delete-frame): Handle child and
`delete-before' frames.
(other-frame): Stop looking for other frame after one round.
(frame-list-z-order, frame-restack): New functions.
(delete-other-frames): Handle child frames.
* lisp/frameset.el (frameset-persistent-filter-alist)
(frameset--record-relationships): Handle `delete-before',
`parent-frame' and `mouse-wheel-frame' parameters.  Rename
latter from `frameset--record-minibuffer-relationships'.
(frameset--restore-frame): Handle ‘parent-frame’ parameter
specially.
(frameset-restore): Handle `delete-before', `parent-frame' and
`mouse-wheel-frame' parameters.
* lisp/mwheel.el (mwheel-scroll): Handle `mouse-wheel-frame'
parameter.
* lisp/window.el (window--min-size-ignore-p): Fix doc-string.
(mouse-autoselect-window-select, handle-select-window): Major
rewrite.  Try to not ignore errors.  Handle auto-selection of
child frames and different values of `focus-follows-mouse'.
* src/frame.c (frame_windows_min_size): Handle new `min-width'
and `min-height' frame parameters.
(make_frame): Initialize new frame structure members.
(do_switch_frame): Don't reset internal_last_event_frame for
descendant frames.
(Fframe_parent, frame_ancestor_p, Fframe_ancestor_p): New
functions.
(candidate_frame): Don't return `no-other-frame' frame.
(other_frames): New function replacing other_visible_frames.
(delete_frame): Rewrite.  Handle child and `delete-before' frames.
(Fmake_frame_invisible): Call other_frames.
(store_frame_param): Check `delete-before' and `parent-frame'
parameters for circular dependencies.
(frame_parms, syms_of_frame): Add entries for and define new
frame parameters.
(focus_follows_mouse): New meaningful value `auto-raise'.
* src/frame.h (z_group): New enumeration type.
(frame): New slots parent_frame, undecorated, override_redirect,
skip_taskbar, no_focus_on_map, no_accept_focus, z_group.
(fset_parent_frame): New inlined function.
(FRAME_UNDECORATED, FRAME_OVERRIDE_REDIRECT)
(FRAME_PARENT_FRAME, FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP)
(FRAME_NO_ACCEPT_FOCUS, FRAME_Z_GROUP, FRAME_Z_GROUP_NONE)
(FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_ABOVE_SUSPENDED)
(FRAME_Z_GROUP_BELOW): New macros.
(frame_ancestor_p): Add declaration.
* src/gtkutil.c (xg_create_frame_widgets): Handle
`undecorated' and `override-redirect' frame parameters.
(x_wm_set_size_hint): None for child frames.
(xg_set_undecorated, xg_frame_restack, xg_set_skip_taskbar)
(xg_set_no_focus_on_map, xg_set_no_accept_focus)
(xg_set_override_redirect): New functions.
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
Don't let scrollbars obscure child frames.
* src/gtkutil.h: (xg_set_undecorated, xg_frame_restack)
(xg_set_skip_taskbar, xg_set_no_focus_on_map)
(xg_set_no_accept_focus, xg_set_override_redirect): Add extern
declarations.
* src/nsfns.m (ns_frame_parm_handlers): Add entries for new
frame parameters.
(Fx_create_frame): Install `min-width' and `min-height' frame
parameters.
* src/nsterm.m (mouseMoved:): Handle focus_follows_mouse change.
* src/w32fns.c (WS_EX_NOACTIVATE): Define if necessary.
(x_real_positions): Handle child frames.
(x_set_menu_bar_lines): Don't for child frames.
(x_set_undecorated, x_set_parent_frame, x_set_skip_taskbar)
(x_set_no_focus_on_map, x_set_no_accept_focus)
(x_set_z_group): New functions.
(w32_createvscrollbar, w32_createhscrollbar): Don't draw
scroll bars over child frames.
(w32_createwindow): Handle new frame parameters and child frames.
(w32_wnd_proc): Let mouse clicks into a child frame activate
the frame.  Try to handle the `no-accept-focus' parameter.  Do
SetFocus when our window is brought to top or becomes the
foreground window.
(w32_window): Don't initialize menu bar for child frames.
(Fx_create_frame): Handle new frame parameters.
(x_create_tip_frame): Set explicit_parent slot.
(w32_dialog_in_progress): New function.
(Fx_file_dialog): Handle `z-group-above' frames.
(w32_frame_list_z_order, Fw32_frame_list_z_order)
(w32_frame_restack, Fw32_frame_restack): New functions.
(w32_frame_parm_handlers): Add entries for new frame
parameters.
* src/w32font.c (Fx_select_font): Handle `z-group-above'
frames during font selection dialogue.
* src/w32term.c (construct_mouse_wheel): Construct mouse wheel
event from F's w32 window.
(w32_mouse_position): Handle child frames.
(w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar):
Don't draw scroll bars over child frames.
(w32_read_socket): Always erase background of child frames.
When generating SELECT_WINDOW_EVENTs handle new value of
`focus-follows-mouse' and handle `no-accept-focus' parameter.
Handle `mouse-wheel-frame' parameter.
(x_calc_absolute_position, x_set_offset, x_set_window_size):
Handle child frames.
(x_make_frame_visible): Handle child frames specially.  Handle
`no-focus-on-map' parameter.
* src/w32term.h (w32_dialog_in_progress): Add external
declaration.
* src/xdisp.c (x_consider_frame_title, prepare_menu_bars): Not
for child frames.
* src/xfns.c (Xm/MwmUtil.h): Include for WM hints.
(PropMotifWmHints, PROP_MOTIF_WM_HINTS_ELEMENTS): Define for
non-Motif, non-GTK case.
(x_real_pos_and_offsets): Handle child frames.
(x_set_undecorated, x_set_parent_frame)
(x_set_no_focus_on_map, x_set_no_accept_focus)
(x_set_override_redirect): New functions.
(x_set_menu_bar_lines): Not for child frames.
(x_window): Handle `undecorated' and `override_redirect' cases.
(Fx_create_frame): Handle new frame parameters.
(frame_geometry): Handle child frames and outer border.
(x_frame_list_z_order, Fx_frame_list_z_order)
(x_frame_restack, Fx_frame_restack): New functions.
(Fx_file_dialog, Fx_select_font): Set x_menu_set_in_use.
(x_frame_parm_handlers): Add entries for new frame parameters.
* src/xmenu.c (x_menu_set_in_use): Handle `z-group-above'
frames.
* src/xterm.c (x_set_frame_alpha): Don't set alpha of parent
for child frames.
(XTmouse_position): Handle child frames.
(x_scroll_bar_create, x_scroll_bar_expose): Don't let scroll
bars obscure child frames.
(handle_one_xevent): Handle child frame positions.  If necessary
set `skip-taskbar' and reassign proper `z-group' when we are
mapped.  When generating SELECT_WINDOW_EVENTs handle new value
of `focus-follows-mouse'.  Handle `mouse-wheel-frame' parameter.
Let mouse clicks into a child frame activate the frame.
(x_calc_absolute_position, x_set_offset): Handle child frames
specially.
(x_set_skip_taskbar, x_set_z_group): New functions.
(x_make_frame_visible): Handle child frames.
(ATOM_REFS_INIT): Add entries for
Xatom_net_wm_state_skip_taskbar, Xatom_net_wm_state_above,
Xatom_net_wm_state_below.
* src/xterm.h (top-level): Declare Xatom_net_wm_state_above,
Xatom_net_wm_state_below and Xatom_net_wm_state_skip_taskbar.
(x_set_skip_taskbar, x_set_z_group): Add extern declarations.
2017-04-12 10:38:25 +02:00