diff options
| author | Miles Bader | 2007-07-24 01:25:28 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-07-24 01:25:28 +0000 |
| commit | 492d9f3e3ccd2b640958e840caa451e9e04e86db (patch) | |
| tree | c87779daf272535b621216ef05179fa48102e57e /src | |
| parent | 7eb1e4534e88a32fe5e549e630fdabf3e062be2b (diff) | |
| parent | 1e8995158740b15936887264a3d7183beb5c51d9 (diff) | |
| download | emacs-492d9f3e3ccd2b640958e840caa451e9e04e86db.tar.gz emacs-492d9f3e3ccd2b640958e840caa451e9e04e86db.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 814-823)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 59-69)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 237-238)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-26
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 82 | ||||
| -rw-r--r-- | src/abbrev.c | 74 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/coding.c | 2 | ||||
| -rw-r--r-- | src/data.c | 6 | ||||
| -rw-r--r-- | src/eval.c | 6 | ||||
| -rw-r--r-- | src/makefile.w32-in | 4 | ||||
| -rw-r--r-- | src/process.c | 6 | ||||
| -rw-r--r-- | src/w32proc.c | 82 | ||||
| -rw-r--r-- | src/window.c | 107 | ||||
| -rw-r--r-- | src/xdisp.c | 10 | ||||
| -rw-r--r-- | src/xfns.c | 1 | ||||
| -rw-r--r-- | src/xterm.c | 50 | ||||
| -rw-r--r-- | src/xterm.h | 1 |
14 files changed, 320 insertions, 113 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a707d884454..ac6b24aaffa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,83 @@ | |||
| 1 | 2007-07-22 Nick Roberts <nickrob@snap.net.nz> | ||
| 2 | |||
| 3 | * xdisp.c (decode_mode_spec): Add case 'R' for to test for | ||
| 4 | remote default-directory. | ||
| 5 | |||
| 6 | * buffer.c (mode-line-format): Describe above case in doc string. | ||
| 7 | |||
| 8 | 2007-07-20 Eli Zaretskii <eliz@gnu.org> | ||
| 9 | |||
| 10 | * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32): | ||
| 11 | Define if not defined. | ||
| 12 | |||
| 13 | 2007-07-18 Jason Rumney <jasonr@gnu.org> | ||
| 14 | |||
| 15 | * w32proc.c (w32_executable_type): Handle 64 bit executables. | ||
| 16 | |||
| 17 | 2007-07-18 Richard Stallman <rms@gnu.org> | ||
| 18 | |||
| 19 | * data.c (Fsetq_default): Doc fix. | ||
| 20 | |||
| 21 | * eval.c (Fsetq): Doc fix. | ||
| 22 | |||
| 23 | 2007-07-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 24 | |||
| 25 | * coding.c (Ffind_operation_coding_system): | ||
| 26 | * eval.c (For, Fand): Doc fixes. | ||
| 27 | Reported by Johan Bockg,Ae(Brd. | ||
| 28 | |||
| 29 | 2007-07-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 30 | |||
| 31 | * xfns.c (Fx_focus_frame): Call x_ewmh_activate_frame. | ||
| 32 | |||
| 33 | * xterm.h: Declare x_ewmh_activate_frame. | ||
| 34 | |||
| 35 | * xterm.c (x_ewmh_activate_frame): New function. | ||
| 36 | (XTframe_raise_lower): Move code to x_ewmh_activate_frame. | ||
| 37 | |||
| 38 | 2007-07-17 Martin Rudalics <rudalics@gmx.at> | ||
| 39 | |||
| 40 | * window.c (Fdisplay_buffer): If largest or LRU window is the | ||
| 41 | only window, split it even if it is not eligible for splitting. | ||
| 42 | This restores the original behavior broken by the 2007-07-15 | ||
| 43 | change. | ||
| 44 | |||
| 45 | 2007-07-17 Glenn Morris <rgm@gnu.org> | ||
| 46 | |||
| 47 | * abbrev.c (abbrev_check_chars): New function. | ||
| 48 | (Fdefine_global_abbrev, Fdefine_mode_abbrev): Call | ||
| 49 | abbrev_check_chars to check abbrev characters are word | ||
| 50 | constituents. Doc fix. | ||
| 51 | |||
| 52 | 2007-07-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 53 | |||
| 54 | * process.c (Fstart_process, Fmake_network_process) | ||
| 55 | (read_process_output): Fix up last changes. | ||
| 56 | |||
| 57 | 2007-07-16 Eli Zaretskii <eliz@gnu.org> | ||
| 58 | |||
| 59 | * makefile.w32-in (clean): Don't delete *~. | ||
| 60 | |||
| 61 | 2007-07-16 Andreas Schwab <schwab@suse.de> | ||
| 62 | |||
| 63 | * window.c (Fdisplay_buffer): Use NILP. | ||
| 64 | (Fset_window_scroll_bars): Likewise. | ||
| 65 | |||
| 66 | 2007-07-15 Martin Rudalics <rudalics@gmx.at> | ||
| 67 | |||
| 68 | * window.c (window_min_size_2): New function. | ||
| 69 | (window_min_size_1, size_window, Fdisplay_buffer) | ||
| 70 | (Fsplit_window, adjust_window_trailing_edge): Use it to avoid | ||
| 71 | windows without mode- or header-lines when window-min-height is | ||
| 72 | too small. | ||
| 73 | (size_window): Reset nodelete_p after testing it, following an | ||
| 74 | earlier note by Kim F. Storm. | ||
| 75 | (display_buffer): Do not set split_height_threshold to twice the | ||
| 76 | value of window_min_height to avoid changing the value of a | ||
| 77 | customizable variable. Rather explicitly check whether the | ||
| 78 | height of the window that shall be splitted is at least as large | ||
| 79 | as split_height_threshold. | ||
| 80 | |||
| 1 | 2007-07-14 Jason Rumney <jasonr@gnu.org> | 81 | 2007-07-14 Jason Rumney <jasonr@gnu.org> |
| 2 | 82 | ||
| 3 | * process.c [WINDOWSNT]: Don't undefine AF_INET6. | 83 | * process.c [WINDOWSNT]: Don't undefine AF_INET6. |
| @@ -8054,7 +8134,7 @@ | |||
| 8054 | 2005-09-19 Kim F. Storm <storm@cua.dk> | 8134 | 2005-09-19 Kim F. Storm <storm@cua.dk> |
| 8055 | 8135 | ||
| 8056 | * editfns.c (Fformat): Don't scan past end of format string that | 8136 | * editfns.c (Fformat): Don't scan past end of format string that |
| 8057 | ends in %. Reported by: Johan Bockg,Ae(Brd. | 8137 | ends in %. Reported by Johan Bockg,Ae(Brd. |
| 8058 | 8138 | ||
| 8059 | 2005-09-18 Andreas Schwab <schwab@suse.de> | 8139 | 2005-09-18 Andreas Schwab <schwab@suse.de> |
| 8060 | 8140 | ||
diff --git a/src/abbrev.c b/src/abbrev.c index 40cad1832fc..6447c450056 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -172,12 +172,79 @@ overwrite a non-system abbreviation of the same name. */) | |||
| 172 | return name; | 172 | return name; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | /* Check if the characters in ABBREV have word syntax in either the | ||
| 176 | * current (if global == 0) or standard syntax table. */ | ||
| 177 | static void | ||
| 178 | abbrev_check_chars (abbrev, global) | ||
| 179 | Lisp_Object abbrev; | ||
| 180 | int global; | ||
| 181 | { | ||
| 182 | int i, i_byte, len, nbad = 0; | ||
| 183 | int j, found, nuniq = 0; | ||
| 184 | char *badchars, *baduniq; | ||
| 185 | |||
| 186 | CHECK_STRING (abbrev); | ||
| 187 | len = SCHARS (abbrev); | ||
| 188 | |||
| 189 | badchars = (char *) alloca (len + 1); | ||
| 190 | |||
| 191 | for (i = 0, i_byte = 0; i < len; ) | ||
| 192 | { | ||
| 193 | int c; | ||
| 194 | |||
| 195 | FETCH_STRING_CHAR_ADVANCE (c, abbrev, i, i_byte); | ||
| 196 | |||
| 197 | if (global) | ||
| 198 | { | ||
| 199 | /* Copied from SYNTAX in syntax.h, except using FOLLOW_PARENT. */ | ||
| 200 | Lisp_Object syntax_temp | ||
| 201 | = SYNTAX_ENTRY_FOLLOW_PARENT (Vstandard_syntax_table, c); | ||
| 202 | if ( (CONSP (syntax_temp) | ||
| 203 | ? (enum syntaxcode) (XINT (XCAR (syntax_temp)) & 0xff) | ||
| 204 | : Swhitespace) != Sword ) badchars[nbad++] = c; | ||
| 205 | } | ||
| 206 | else if (SYNTAX (c) != Sword) | ||
| 207 | badchars[nbad++] = c; | ||
| 208 | } | ||
| 209 | |||
| 210 | if (nbad == 0) return; | ||
| 211 | |||
| 212 | baduniq = (char *) alloca (nbad + 1); | ||
| 213 | |||
| 214 | for (i = 0; i < nbad; i++) | ||
| 215 | { | ||
| 216 | found = 0; | ||
| 217 | |||
| 218 | for (j = 0; j < nuniq; j++) | ||
| 219 | { | ||
| 220 | if (badchars[i] == baduniq[j]) | ||
| 221 | { | ||
| 222 | found = 1; | ||
| 223 | break; | ||
| 224 | } | ||
| 225 | } | ||
| 226 | |||
| 227 | if (found) continue ; | ||
| 228 | |||
| 229 | baduniq[nuniq++] = badchars[i]; | ||
| 230 | } | ||
| 231 | |||
| 232 | baduniq[nuniq] = '\0'; | ||
| 233 | |||
| 234 | error ("Some abbrev characters (%s) are not word constituents %s", | ||
| 235 | baduniq, global ? "in the standard syntax" : "in this mode" ); | ||
| 236 | } | ||
| 237 | |||
| 175 | DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, 2, | 238 | DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, 2, |
| 176 | "sDefine global abbrev: \nsExpansion for %s: ", | 239 | "sDefine global abbrev: \nsExpansion for %s: ", |
| 177 | doc: /* Define ABBREV as a global abbreviation for EXPANSION. */) | 240 | doc: /* Define ABBREV as a global abbreviation for EXPANSION. |
| 241 | The characters in ABBREV must all be word constituents in the standard | ||
| 242 | syntax table. */) | ||
| 178 | (abbrev, expansion) | 243 | (abbrev, expansion) |
| 179 | Lisp_Object abbrev, expansion; | 244 | Lisp_Object abbrev, expansion; |
| 180 | { | 245 | { |
| 246 | abbrev_check_chars (abbrev, 1); | ||
| 247 | |||
| 181 | Fdefine_abbrev (Vglobal_abbrev_table, Fdowncase (abbrev), | 248 | Fdefine_abbrev (Vglobal_abbrev_table, Fdowncase (abbrev), |
| 182 | expansion, Qnil, make_number (0), Qnil); | 249 | expansion, Qnil, make_number (0), Qnil); |
| 183 | return abbrev; | 250 | return abbrev; |
| @@ -185,13 +252,16 @@ DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, | |||
| 185 | 252 | ||
| 186 | DEFUN ("define-mode-abbrev", Fdefine_mode_abbrev, Sdefine_mode_abbrev, 2, 2, | 253 | DEFUN ("define-mode-abbrev", Fdefine_mode_abbrev, Sdefine_mode_abbrev, 2, 2, |
| 187 | "sDefine mode abbrev: \nsExpansion for %s: ", | 254 | "sDefine mode abbrev: \nsExpansion for %s: ", |
| 188 | doc: /* Define ABBREV as a mode-specific abbreviation for EXPANSION. */) | 255 | doc: /* Define ABBREV as a mode-specific abbreviation for EXPANSION. |
| 256 | The characters in ABBREV must all be word-constituents in the current mode. */) | ||
| 189 | (abbrev, expansion) | 257 | (abbrev, expansion) |
| 190 | Lisp_Object abbrev, expansion; | 258 | Lisp_Object abbrev, expansion; |
| 191 | { | 259 | { |
| 192 | if (NILP (current_buffer->abbrev_table)) | 260 | if (NILP (current_buffer->abbrev_table)) |
| 193 | error ("Major mode has no abbrev table"); | 261 | error ("Major mode has no abbrev table"); |
| 194 | 262 | ||
| 263 | abbrev_check_chars (abbrev, 0); | ||
| 264 | |||
| 195 | Fdefine_abbrev (current_buffer->abbrev_table, Fdowncase (abbrev), | 265 | Fdefine_abbrev (current_buffer->abbrev_table, Fdowncase (abbrev), |
| 196 | expansion, Qnil, make_number (0), Qnil); | 266 | expansion, Qnil, make_number (0), Qnil); |
| 197 | return abbrev; | 267 | return abbrev; |
diff --git a/src/buffer.c b/src/buffer.c index c74a6cbc2a5..3c46bdc6981 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5531,6 +5531,8 @@ A string is printed verbatim in the mode line except for %-constructs: | |||
| 5531 | %P -- print percent of buffer above bottom of window, perhaps plus Top, | 5531 | %P -- print percent of buffer above bottom of window, perhaps plus Top, |
| 5532 | or print Bottom or All. | 5532 | or print Bottom or All. |
| 5533 | %n -- print Narrow if appropriate. | 5533 | %n -- print Narrow if appropriate. |
| 5534 | %R -- print R or hyphen. R means that default-directory is on a | ||
| 5535 | remote machine. | ||
| 5534 | %t -- visited file is text or binary (if OS supports this distinction). | 5536 | %t -- visited file is text or binary (if OS supports this distinction). |
| 5535 | %z -- print mnemonics of keyboard, terminal, and buffer coding systems. | 5537 | %z -- print mnemonics of keyboard, terminal, and buffer coding systems. |
| 5536 | %Z -- like %z, but including the end-of-line format. | 5538 | %Z -- like %z, but including the end-of-line format. |
diff --git a/src/coding.c b/src/coding.c index 2b7a7422d5c..52fe696b23d 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7482,7 +7482,7 @@ contents (not yet decoded). If `file-coding-system-alist' specifies a | |||
| 7482 | function to call for FILENAME, that function should examine the | 7482 | function to call for FILENAME, that function should examine the |
| 7483 | contents of BUFFER instead of reading the file. | 7483 | contents of BUFFER instead of reading the file. |
| 7484 | 7484 | ||
| 7485 | usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) | 7485 | usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) |
| 7486 | (nargs, args) | 7486 | (nargs, args) |
| 7487 | int nargs; | 7487 | int nargs; |
| 7488 | Lisp_Object *args; | 7488 | Lisp_Object *args; |
diff --git a/src/data.c b/src/data.c index b31900f9c0c..3e58fb00c3d 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1452,7 +1452,7 @@ More generally, you can use multiple variables and values, as in | |||
| 1452 | This sets each VAR's default value to the corresponding VALUE. | 1452 | This sets each VAR's default value to the corresponding VALUE. |
| 1453 | The VALUE for the Nth VAR can refer to the new default values | 1453 | The VALUE for the Nth VAR can refer to the new default values |
| 1454 | of previous VARs. | 1454 | of previous VARs. |
| 1455 | usage: (setq-default [VAR VALUE...]) */) | 1455 | usage: (setq-default [VAR VALUE]...) */) |
| 1456 | (args) | 1456 | (args) |
| 1457 | Lisp_Object args; | 1457 | Lisp_Object args; |
| 1458 | { | 1458 | { |
| @@ -2406,7 +2406,9 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | |||
| 2406 | return Qnil; | 2406 | return Qnil; |
| 2407 | } | 2407 | } |
| 2408 | 2408 | ||
| 2409 | /* Convert between long values and pairs of Lisp integers. */ | 2409 | /* Convert between long values and pairs of Lisp integers. |
| 2410 | Note that long_to_cons returns a single Lisp integer | ||
| 2411 | when the value fits in one. */ | ||
| 2410 | 2412 | ||
| 2411 | Lisp_Object | 2413 | Lisp_Object |
| 2412 | long_to_cons (i) | 2414 | long_to_cons (i) |
diff --git a/src/eval.c b/src/eval.c index 6de9a5acc99..16661378e82 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -330,7 +330,7 @@ DEFUN ("or", For, Sor, 0, UNEVALLED, 0, | |||
| 330 | doc: /* Eval args until one of them yields non-nil, then return that value. | 330 | doc: /* Eval args until one of them yields non-nil, then return that value. |
| 331 | The remaining args are not evalled at all. | 331 | The remaining args are not evalled at all. |
| 332 | If all args return nil, return nil. | 332 | If all args return nil, return nil. |
| 333 | usage: (or CONDITIONS ...) */) | 333 | usage: (or CONDITIONS...) */) |
| 334 | (args) | 334 | (args) |
| 335 | Lisp_Object args; | 335 | Lisp_Object args; |
| 336 | { | 336 | { |
| @@ -355,7 +355,7 @@ DEFUN ("and", Fand, Sand, 0, UNEVALLED, 0, | |||
| 355 | doc: /* Eval args until one of them yields nil, then return nil. | 355 | doc: /* Eval args until one of them yields nil, then return nil. |
| 356 | The remaining args are not evalled at all. | 356 | The remaining args are not evalled at all. |
| 357 | If no arg yields nil, return the last arg's value. | 357 | If no arg yields nil, return the last arg's value. |
| 358 | usage: (and CONDITIONS ...) */) | 358 | usage: (and CONDITIONS...) */) |
| 359 | (args) | 359 | (args) |
| 360 | Lisp_Object args; | 360 | Lisp_Object args; |
| 361 | { | 361 | { |
| @@ -531,7 +531,7 @@ Thus, (setq x (1+ y)) sets `x' to the value of `(1+ y)'. | |||
| 531 | The second VAL is not computed until after the first SYM is set, and so on; | 531 | The second VAL is not computed until after the first SYM is set, and so on; |
| 532 | each VAL can use the new value of variables set earlier in the `setq'. | 532 | each VAL can use the new value of variables set earlier in the `setq'. |
| 533 | The return value of the `setq' form is the value of the last VAL. | 533 | The return value of the `setq' form is the value of the last VAL. |
| 534 | usage: (setq SYM VAL SYM VAL ...) */) | 534 | usage: (setq [SYM VAL]...) */) |
| 535 | (args) | 535 | (args) |
| 536 | Lisp_Object args; | 536 | Lisp_Object args; |
| 537 | { | 537 | { |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index d9986fb8368..a896675ab6e 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -248,8 +248,10 @@ install: $(ALL) | |||
| 248 | # | 248 | # |
| 249 | # Maintenance | 249 | # Maintenance |
| 250 | # | 250 | # |
| 251 | # We used to delete *~, s/*~, m/*~ here, but that might inadvertently | ||
| 252 | # remove precious files if it happens to match their short 8+3 aliases. | ||
| 251 | clean: | 253 | clean: |
| 252 | - $(DEL) *~ "s/*~" "m/*~" | 254 | - $(DEL) "s/*.h~" "m/*.h~" |
| 253 | - $(DEL) $(COMPILER_TEMP_FILES) | 255 | - $(DEL) $(COMPILER_TEMP_FILES) |
| 254 | - $(DEL_TREE) $(OBJDIR) | 256 | - $(DEL_TREE) $(OBJDIR) |
| 255 | - $(DEL) stamp_BLD | 257 | - $(DEL) stamp_BLD |
diff --git a/src/process.c b/src/process.c index b63edbe0b6d..f6e936105f3 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1776,7 +1776,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1776 | XPROCESS (proc)->encoding_buf = make_uninit_string (0); | 1776 | XPROCESS (proc)->encoding_buf = make_uninit_string (0); |
| 1777 | 1777 | ||
| 1778 | XPROCESS (proc)->inherit_coding_system_flag | 1778 | XPROCESS (proc)->inherit_coding_system_flag |
| 1779 | = (NILP (buffer) || !inherit_process_coding_system); | 1779 | = !(NILP (buffer) || !inherit_process_coding_system); |
| 1780 | 1780 | ||
| 1781 | create_process (proc, (char **) new_argv, current_dir); | 1781 | create_process (proc, (char **) new_argv, current_dir); |
| 1782 | 1782 | ||
| @@ -3553,7 +3553,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3553 | p->encoding_buf = make_uninit_string (0); | 3553 | p->encoding_buf = make_uninit_string (0); |
| 3554 | 3554 | ||
| 3555 | p->inherit_coding_system_flag | 3555 | p->inherit_coding_system_flag |
| 3556 | = (!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); | 3556 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); |
| 3557 | 3557 | ||
| 3558 | UNGCPRO; | 3558 | UNGCPRO; |
| 3559 | return proc; | 3559 | return proc; |
| @@ -5186,7 +5186,7 @@ read_process_output (proc, channel) | |||
| 5186 | carryover); | 5186 | carryover); |
| 5187 | p->decoding_carryover = carryover; | 5187 | p->decoding_carryover = carryover; |
| 5188 | /* Adjust the multibyteness of TEXT to that of the filter. */ | 5188 | /* Adjust the multibyteness of TEXT to that of the filter. */ |
| 5189 | if (p->filter_multibyte != STRING_MULTIBYTE (text)) | 5189 | if (!p->filter_multibyte != !STRING_MULTIBYTE (text)) |
| 5190 | text = (STRING_MULTIBYTE (text) | 5190 | text = (STRING_MULTIBYTE (text) |
| 5191 | ? Fstring_as_unibyte (text) | 5191 | ? Fstring_as_unibyte (text) |
| 5192 | : Fstring_to_multibyte (text)); | 5192 | : Fstring_to_multibyte (text)); |
diff --git a/src/w32proc.c b/src/w32proc.c index 2120a51fb89..8c99a0a1dff 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -590,6 +590,13 @@ get_result: | |||
| 590 | return pid; | 590 | return pid; |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | /* Old versions of w32api headers don't have separate 32-bit and | ||
| 594 | 64-bit defines, but the one they have matches the 32-bit variety. */ | ||
| 595 | #ifndef IMAGE_NT_OPTIONAL_HDR32_MAGIC | ||
| 596 | # define IMAGE_NT_OPTIONAL_HDR32_MAGIC IMAGE_NT_OPTIONAL_HDR_MAGIC | ||
| 597 | # define IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER | ||
| 598 | #endif | ||
| 599 | |||
| 593 | void | 600 | void |
| 594 | w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int * is_gui_app) | 601 | w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int * is_gui_app) |
| 595 | { | 602 | { |
| @@ -650,33 +657,54 @@ w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int | |||
| 650 | } | 657 | } |
| 651 | else if (nt_header->Signature == IMAGE_NT_SIGNATURE) | 658 | else if (nt_header->Signature == IMAGE_NT_SIGNATURE) |
| 652 | { | 659 | { |
| 653 | /* Look for cygwin.dll in DLL import list. */ | 660 | IMAGE_DATA_DIRECTORY *data_dir = NULL; |
| 654 | IMAGE_DATA_DIRECTORY import_dir = | 661 | if (nt_header->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) |
| 655 | nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]; | 662 | { |
| 656 | IMAGE_IMPORT_DESCRIPTOR * imports; | 663 | /* Ensure we are using the 32 bit structure. */ |
| 657 | IMAGE_SECTION_HEADER * section; | 664 | IMAGE_OPTIONAL_HEADER32 *opt |
| 658 | 665 | = (IMAGE_OPTIONAL_HEADER32*) &(nt_header->OptionalHeader); | |
| 659 | section = rva_to_section (import_dir.VirtualAddress, nt_header); | 666 | data_dir = opt->DataDirectory; |
| 660 | imports = RVA_TO_PTR (import_dir.VirtualAddress, section, executable); | 667 | *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); |
| 661 | 668 | } | |
| 662 | for ( ; imports->Name; imports++) | 669 | /* MingW 3.12 has the required 64 bit structs, but in case older |
| 663 | { | 670 | versions don't, only check 64 bit exes if we know how. */ |
| 664 | char * dllname = RVA_TO_PTR (imports->Name, section, executable); | 671 | #ifdef IMAGE_NT_OPTIONAL_HDR64_MAGIC |
| 665 | 672 | else if (nt_header->OptionalHeader.Magic | |
| 666 | /* The exact name of the cygwin dll has changed with | 673 | == IMAGE_NT_OPTIONAL_HDR64_MAGIC) |
| 667 | various releases, but hopefully this will be reasonably | 674 | { |
| 668 | future proof. */ | 675 | IMAGE_OPTIONAL_HEADER64 *opt |
| 669 | if (strncmp (dllname, "cygwin", 6) == 0) | 676 | = (IMAGE_OPTIONAL_HEADER64*) &(nt_header->OptionalHeader); |
| 670 | { | 677 | data_dir = opt->DataDirectory; |
| 671 | *is_cygnus_app = TRUE; | 678 | *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); |
| 672 | break; | 679 | } |
| 673 | } | 680 | #endif |
| 674 | } | 681 | if (data_dir) |
| 675 | 682 | { | |
| 676 | /* Check whether app is marked as a console or windowed (aka | 683 | /* Look for cygwin.dll in DLL import list. */ |
| 677 | GUI) app. Accept Posix and OS2 subsytem apps as console | 684 | IMAGE_DATA_DIRECTORY import_dir = |
| 678 | apps. */ | 685 | data_dir[IMAGE_DIRECTORY_ENTRY_IMPORT]; |
| 679 | *is_gui_app = (nt_header->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); | 686 | IMAGE_IMPORT_DESCRIPTOR * imports; |
| 687 | IMAGE_SECTION_HEADER * section; | ||
| 688 | |||
| 689 | section = rva_to_section (import_dir.VirtualAddress, nt_header); | ||
| 690 | imports = RVA_TO_PTR (import_dir.VirtualAddress, section, | ||
| 691 | executable); | ||
| 692 | |||
| 693 | for ( ; imports->Name; imports++) | ||
| 694 | { | ||
| 695 | char * dllname = RVA_TO_PTR (imports->Name, section, | ||
| 696 | executable); | ||
| 697 | |||
| 698 | /* The exact name of the cygwin dll has changed with | ||
| 699 | various releases, but hopefully this will be reasonably | ||
| 700 | future proof. */ | ||
| 701 | if (strncmp (dllname, "cygwin", 6) == 0) | ||
| 702 | { | ||
| 703 | *is_cygnus_app = TRUE; | ||
| 704 | break; | ||
| 705 | } | ||
| 706 | } | ||
| 707 | } | ||
| 680 | } | 708 | } |
| 681 | } | 709 | } |
| 682 | 710 | ||
diff --git a/src/window.c b/src/window.c index e5dd9b030d9..3fa1e7cff0e 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -64,6 +64,7 @@ static void window_scroll P_ ((Lisp_Object, int, int, int)); | |||
| 64 | static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); | 64 | static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); |
| 65 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); | 65 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); |
| 66 | static int window_min_size_1 P_ ((struct window *, int)); | 66 | static int window_min_size_1 P_ ((struct window *, int)); |
| 67 | static int window_min_size_2 P_ ((struct window *, int)); | ||
| 67 | static int window_min_size P_ ((struct window *, int, int, int *)); | 68 | static int window_min_size P_ ((struct window *, int, int, int *)); |
| 68 | static void size_window P_ ((Lisp_Object, int, int, int, int, int)); | 69 | static void size_window P_ ((Lisp_Object, int, int, int, int, int)); |
| 69 | static int freeze_window_start P_ ((struct window *, void *)); | 70 | static int freeze_window_start P_ ((struct window *, void *)); |
| @@ -2555,7 +2556,6 @@ check_frame_size (frame, rows, cols) | |||
| 2555 | *cols = MIN_SAFE_WINDOW_WIDTH; | 2556 | *cols = MIN_SAFE_WINDOW_WIDTH; |
| 2556 | } | 2557 | } |
| 2557 | 2558 | ||
| 2558 | |||
| 2559 | /* Value is non-zero if window W is fixed-size. WIDTH_P non-zero means | 2559 | /* Value is non-zero if window W is fixed-size. WIDTH_P non-zero means |
| 2560 | check if W's width can be changed, otherwise check W's height. | 2560 | check if W's width can be changed, otherwise check W's height. |
| 2561 | CHECK_SIBLINGS_P non-zero means check resizablity of WINDOW's | 2561 | CHECK_SIBLINGS_P non-zero means check resizablity of WINDOW's |
| @@ -2657,6 +2657,33 @@ window_fixed_size_p (w, width_p, check_siblings_p) | |||
| 2657 | return fixed_p; | 2657 | return fixed_p; |
| 2658 | } | 2658 | } |
| 2659 | 2659 | ||
| 2660 | /* Return the minimum size for leaf window W. WIDTH_P non-zero means | ||
| 2661 | take into account fringes and the scrollbar of W. WIDTH_P zero | ||
| 2662 | means take into account mode-line and header-line of W. Return 1 | ||
| 2663 | for the minibuffer. */ | ||
| 2664 | |||
| 2665 | static int | ||
| 2666 | window_min_size_2 (w, width_p) | ||
| 2667 | struct window *w; | ||
| 2668 | int width_p; | ||
| 2669 | { | ||
| 2670 | int size; | ||
| 2671 | |||
| 2672 | if (width_p) | ||
| 2673 | size = max (window_min_width, | ||
| 2674 | (MIN_SAFE_WINDOW_WIDTH | ||
| 2675 | + WINDOW_FRINGE_COLS (w) | ||
| 2676 | + WINDOW_SCROLL_BAR_COLS (w))); | ||
| 2677 | else if (MINI_WINDOW_P (w)) | ||
| 2678 | size = 1; | ||
| 2679 | else | ||
| 2680 | size = max (window_min_height, | ||
| 2681 | (MIN_SAFE_WINDOW_HEIGHT | ||
| 2682 | + (WINDOW_WANTS_MODELINE_P (w) ? 1 : 0) | ||
| 2683 | + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0 ))); | ||
| 2684 | |||
| 2685 | return size; | ||
| 2686 | } | ||
| 2660 | 2687 | ||
| 2661 | /* Return the minimum size of window W, not taking fixed-width windows | 2688 | /* Return the minimum size of window W, not taking fixed-width windows |
| 2662 | into account. WIDTH_P non-zero means return the minimum width, | 2689 | into account. WIDTH_P non-zero means return the minimum width, |
| @@ -2726,22 +2753,7 @@ window_min_size_1 (w, width_p) | |||
| 2726 | } | 2753 | } |
| 2727 | } | 2754 | } |
| 2728 | else | 2755 | else |
| 2729 | { | 2756 | size = window_min_size_2 (w, width_p); |
| 2730 | if (width_p) | ||
| 2731 | size = max (window_min_width, | ||
| 2732 | (MIN_SAFE_WINDOW_WIDTH | ||
| 2733 | + WINDOW_FRINGE_COLS (w) | ||
| 2734 | + WINDOW_SCROLL_BAR_COLS (w))); | ||
| 2735 | else | ||
| 2736 | { | ||
| 2737 | if (MINI_WINDOW_P (w) | ||
| 2738 | || (!WINDOW_WANTS_MODELINE_P (w) | ||
| 2739 | && !WINDOW_WANTS_HEADER_LINE_P (w))) | ||
| 2740 | size = 1; | ||
| 2741 | else | ||
| 2742 | size = window_min_height; | ||
| 2743 | } | ||
| 2744 | } | ||
| 2745 | 2757 | ||
| 2746 | return size; | 2758 | return size; |
| 2747 | } | 2759 | } |
| @@ -2983,11 +2995,6 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) | |||
| 2983 | Lisp_Object child, *forward, *sideward; | 2995 | Lisp_Object child, *forward, *sideward; |
| 2984 | int old_size, min_size, safe_min_size; | 2996 | int old_size, min_size, safe_min_size; |
| 2985 | 2997 | ||
| 2986 | /* We test nodelete_p != 2 and nodelete_p != 1 below, so it | ||
| 2987 | seems like it's too soon to do this here. ++KFS. */ | ||
| 2988 | if (nodelete_p == 2) | ||
| 2989 | nodelete_p = 0; | ||
| 2990 | |||
| 2991 | check_min_window_sizes (); | 2998 | check_min_window_sizes (); |
| 2992 | size = max (0, size); | 2999 | size = max (0, size); |
| 2993 | 3000 | ||
| @@ -2998,22 +3005,23 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) | |||
| 2998 | { | 3005 | { |
| 2999 | old_size = WINDOW_TOTAL_COLS (w); | 3006 | old_size = WINDOW_TOTAL_COLS (w); |
| 3000 | min_size = window_min_width; | 3007 | min_size = window_min_width; |
| 3001 | /* Ensure that there is room for the scroll bar and fringes! | 3008 | safe_min_size = window_min_size_2 (w, 1); |
| 3002 | We may reduce display margins though. */ | ||
| 3003 | safe_min_size = (MIN_SAFE_WINDOW_WIDTH | ||
| 3004 | + WINDOW_FRINGE_COLS (w) | ||
| 3005 | + WINDOW_SCROLL_BAR_COLS (w)); | ||
| 3006 | } | 3009 | } |
| 3007 | else | 3010 | else |
| 3008 | { | 3011 | { |
| 3009 | old_size = XINT (w->total_lines); | 3012 | old_size = XINT (w->total_lines); |
| 3010 | min_size = window_min_height; | 3013 | min_size = window_min_height; |
| 3011 | safe_min_size = MIN_SAFE_WINDOW_HEIGHT; | 3014 | safe_min_size = window_min_size_2 (w, 0); |
| 3012 | } | 3015 | } |
| 3013 | 3016 | ||
| 3014 | if (old_size < min_size && nodelete_p != 2) | 3017 | if (old_size < min_size && nodelete_p != 2) |
| 3015 | w->too_small_ok = Qt; | 3018 | w->too_small_ok = Qt; |
| 3016 | 3019 | ||
| 3020 | /* Move the following test here since otherwise the | ||
| 3021 | preceding test doesn't make sense. martin. */ | ||
| 3022 | if (nodelete_p == 2) | ||
| 3023 | nodelete_p = 0; | ||
| 3024 | |||
| 3017 | /* Maybe delete WINDOW if it's too small. */ | 3025 | /* Maybe delete WINDOW if it's too small. */ |
| 3018 | if (nodelete_p != 1 && !NILP (w->parent)) | 3026 | if (nodelete_p != 1 && !NILP (w->parent)) |
| 3019 | { | 3027 | { |
| @@ -3710,9 +3718,6 @@ displayed. */) | |||
| 3710 | frames = Qnil; | 3718 | frames = Qnil; |
| 3711 | if (FRAME_MINIBUF_ONLY_P (f)) | 3719 | if (FRAME_MINIBUF_ONLY_P (f)) |
| 3712 | XSETFRAME (frames, last_nonminibuf_frame); | 3720 | XSETFRAME (frames, last_nonminibuf_frame); |
| 3713 | /* Don't try to create a window if we would get an error. */ | ||
| 3714 | if (split_height_threshold < window_min_height << 1) | ||
| 3715 | split_height_threshold = window_min_height << 1; | ||
| 3716 | 3721 | ||
| 3717 | /* Note that both Fget_largest_window and Fget_lru_window | 3722 | /* Note that both Fget_largest_window and Fget_lru_window |
| 3718 | ignore minibuffers and dedicated windows. | 3723 | ignore minibuffers and dedicated windows. |
| @@ -3735,25 +3740,30 @@ displayed. */) | |||
| 3735 | else | 3740 | else |
| 3736 | window = Fget_largest_window (frames, Qt); | 3741 | window = Fget_largest_window (frames, Qt); |
| 3737 | 3742 | ||
| 3738 | /* If we got a tall enough full-width window that can be split, | 3743 | /* If the largest window is tall enough, full-width, and either eligible |
| 3739 | split it. */ | 3744 | for splitting or the only window, split it. */ |
| 3740 | if (!NILP (window) | 3745 | if (!NILP (window) |
| 3741 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3746 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
| 3742 | && window_height (window) >= split_height_threshold | 3747 | && WINDOW_FULL_WIDTH_P (XWINDOW (window)) |
| 3743 | && WINDOW_FULL_WIDTH_P (XWINDOW (window))) | 3748 | && (window_height (window) >= split_height_threshold |
| 3749 | || (NILP (XWINDOW (window)->parent))) | ||
| 3750 | && (window_height (window) | ||
| 3751 | >= (2 * window_min_size_2 (XWINDOW (window), 0)))) | ||
| 3744 | window = Fsplit_window (window, Qnil, Qnil); | 3752 | window = Fsplit_window (window, Qnil, Qnil); |
| 3745 | else | 3753 | else |
| 3746 | { | 3754 | { |
| 3747 | Lisp_Object upper, lower, other; | 3755 | Lisp_Object upper, lower, other; |
| 3748 | 3756 | ||
| 3749 | window = Fget_lru_window (frames, Qt); | 3757 | window = Fget_lru_window (frames, Qt); |
| 3750 | /* If the LRU window is selected, and big enough, | 3758 | /* If the LRU window is tall enough, and either eligible for splitting |
| 3751 | and can be split, split it. */ | 3759 | and selected or the only window, split it. */ |
| 3752 | if (!NILP (window) | 3760 | if (!NILP (window) |
| 3753 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3761 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
| 3754 | && (EQ (window, selected_window) | 3762 | && ((EQ (window, selected_window) |
| 3755 | || EQ (XWINDOW (window)->parent, Qnil)) | 3763 | && window_height (window) >= split_height_threshold) |
| 3756 | && window_height (window) >= window_min_height << 1) | 3764 | || (NILP (XWINDOW (window)->parent))) |
| 3765 | && (window_height (window) | ||
| 3766 | >= (2 * window_min_size_2 (XWINDOW (window), 0)))) | ||
| 3757 | window = Fsplit_window (window, Qnil, Qnil); | 3767 | window = Fsplit_window (window, Qnil, Qnil); |
| 3758 | else | 3768 | else |
| 3759 | window = Fget_lru_window (frames, Qnil); | 3769 | window = Fget_lru_window (frames, Qnil); |
| @@ -4002,9 +4012,11 @@ See Info node `(elisp)Splitting Windows' for more details and examples.*/) | |||
| 4002 | 4012 | ||
| 4003 | if (NILP (horflag)) | 4013 | if (NILP (horflag)) |
| 4004 | { | 4014 | { |
| 4005 | if (size_int < window_min_height) | 4015 | int window_safe_height = window_min_size_2 (o, 0); |
| 4016 | |||
| 4017 | if (size_int < window_safe_height) | ||
| 4006 | error ("Window height %d too small (after splitting)", size_int); | 4018 | error ("Window height %d too small (after splitting)", size_int); |
| 4007 | if (size_int + window_min_height > XFASTINT (o->total_lines)) | 4019 | if (size_int + window_safe_height > XFASTINT (o->total_lines)) |
| 4008 | error ("Window height %d too small (after splitting)", | 4020 | error ("Window height %d too small (after splitting)", |
| 4009 | XFASTINT (o->total_lines) - size_int); | 4021 | XFASTINT (o->total_lines) - size_int); |
| 4010 | if (NILP (o->parent) | 4022 | if (NILP (o->parent) |
| @@ -4017,10 +4029,11 @@ See Info node `(elisp)Splitting Windows' for more details and examples.*/) | |||
| 4017 | } | 4029 | } |
| 4018 | else | 4030 | else |
| 4019 | { | 4031 | { |
| 4020 | if (size_int < window_min_width) | 4032 | int window_safe_width = window_min_size_2 (o, 1); |
| 4033 | |||
| 4034 | if (size_int < window_safe_width) | ||
| 4021 | error ("Window width %d too small (after splitting)", size_int); | 4035 | error ("Window width %d too small (after splitting)", size_int); |
| 4022 | 4036 | if (size_int + window_safe_width > XFASTINT (o->total_cols)) | |
| 4023 | if (size_int + window_min_width > XFASTINT (o->total_cols)) | ||
| 4024 | error ("Window width %d too small (after splitting)", | 4037 | error ("Window width %d too small (after splitting)", |
| 4025 | XFASTINT (o->total_cols) - size_int); | 4038 | XFASTINT (o->total_cols) - size_int); |
| 4026 | if (NILP (o->parent) | 4039 | if (NILP (o->parent) |
| @@ -4501,7 +4514,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4501 | 4514 | ||
| 4502 | /* Don't make this window too small. */ | 4515 | /* Don't make this window too small. */ |
| 4503 | if (XINT (CURSIZE (window)) + delta | 4516 | if (XINT (CURSIZE (window)) + delta |
| 4504 | < (horiz_flag ? window_min_width : window_min_height)) | 4517 | < window_min_size_2 (XWINDOW (window), horiz_flag)) |
| 4505 | { | 4518 | { |
| 4506 | Fset_window_configuration (old_config); | 4519 | Fset_window_configuration (old_config); |
| 4507 | error ("Cannot adjust window size as specified"); | 4520 | error ("Cannot adjust window size as specified"); |
| @@ -6899,7 +6912,7 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */) | |||
| 6899 | vertical_type = Qnil; | 6912 | vertical_type = Qnil; |
| 6900 | } | 6913 | } |
| 6901 | 6914 | ||
| 6902 | if (!(EQ (vertical_type, Qnil) | 6915 | if (!(NILP (vertical_type) |
| 6903 | || EQ (vertical_type, Qleft) | 6916 | || EQ (vertical_type, Qleft) |
| 6904 | || EQ (vertical_type, Qright) | 6917 | || EQ (vertical_type, Qright) |
| 6905 | || EQ (vertical_type, Qt))) | 6918 | || EQ (vertical_type, Qt))) |
diff --git a/src/xdisp.c b/src/xdisp.c index ca6939109a9..d35d92cfc26 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -18006,6 +18006,16 @@ decode_mode_spec (w, c, field_width, precision, multibyte) | |||
| 18006 | #endif | 18006 | #endif |
| 18007 | break; | 18007 | break; |
| 18008 | 18008 | ||
| 18009 | case 'R': | ||
| 18010 | { | ||
| 18011 | Lisp_Object val; | ||
| 18012 | val = call1 (intern ("file-remote-p"), current_buffer->directory); | ||
| 18013 | if (NILP (val)) | ||
| 18014 | return "-"; | ||
| 18015 | else | ||
| 18016 | return "@"; | ||
| 18017 | } | ||
| 18018 | |||
| 18009 | case 't': /* indicate TEXT or BINARY */ | 18019 | case 't': /* indicate TEXT or BINARY */ |
| 18010 | #ifdef MODE_LINE_BINARY_TEXT | 18020 | #ifdef MODE_LINE_BINARY_TEXT |
| 18011 | return MODE_LINE_BINARY_TEXT (b); | 18021 | return MODE_LINE_BINARY_TEXT (b); |
diff --git a/src/xfns.c b/src/xfns.c index 0dab5d9dd64..46acd4a77e5 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3530,6 +3530,7 @@ FRAME nil means use the selected frame. */) | |||
| 3530 | x_catch_errors (dpy); | 3530 | x_catch_errors (dpy); |
| 3531 | XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 3531 | XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 3532 | RevertToParent, CurrentTime); | 3532 | RevertToParent, CurrentTime); |
| 3533 | x_ewmh_activate_frame (f); | ||
| 3533 | x_uncatch_errors (); | 3534 | x_uncatch_errors (); |
| 3534 | UNBLOCK_INPUT; | 3535 | UNBLOCK_INPUT; |
| 3535 | 3536 | ||
diff --git a/src/xterm.c b/src/xterm.c index 9f392710270..2873a2a76c9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8893,38 +8893,36 @@ x_lower_frame (f) | |||
| 8893 | } | 8893 | } |
| 8894 | } | 8894 | } |
| 8895 | 8895 | ||
| 8896 | /* Activate frame with Extended Window Manager Hints */ | ||
| 8897 | |||
| 8898 | void | ||
| 8899 | x_ewmh_activate_frame (f) | ||
| 8900 | FRAME_PTR f; | ||
| 8901 | { | ||
| 8902 | /* See Window Manager Specification/Extended Window Manager Hints at | ||
| 8903 | http://freedesktop.org/wiki/Standards_2fwm_2dspec */ | ||
| 8904 | |||
| 8905 | const char *atom = "_NET_ACTIVE_WINDOW"; | ||
| 8906 | if (f->async_visible && wm_supports (f, atom)) | ||
| 8907 | { | ||
| 8908 | Lisp_Object frame; | ||
| 8909 | XSETFRAME (frame, f); | ||
| 8910 | Fx_send_client_event (frame, make_number (0), frame, | ||
| 8911 | make_unibyte_string (atom, strlen (atom)), | ||
| 8912 | make_number (32), | ||
| 8913 | Fcons (make_number (1), | ||
| 8914 | Fcons (make_number (last_user_time), | ||
| 8915 | Qnil))); | ||
| 8916 | } | ||
| 8917 | } | ||
| 8918 | |||
| 8896 | static void | 8919 | static void |
| 8897 | XTframe_raise_lower (f, raise_flag) | 8920 | XTframe_raise_lower (f, raise_flag) |
| 8898 | FRAME_PTR f; | 8921 | FRAME_PTR f; |
| 8899 | int raise_flag; | 8922 | int raise_flag; |
| 8900 | { | 8923 | { |
| 8901 | if (raise_flag) | 8924 | if (raise_flag) |
| 8902 | { | 8925 | x_raise_frame (f); |
| 8903 | /* The following code is needed for `raise-frame' to work on | ||
| 8904 | some versions of metacity; see Window Manager | ||
| 8905 | Specification/Extended Window Manager Hints at | ||
| 8906 | http://freedesktop.org/wiki/Standards_2fwm_2dspec */ | ||
| 8907 | |||
| 8908 | #if 0 | ||
| 8909 | /* However, on other versions (metacity 2.17.2-1.fc7), it | ||
| 8910 | reportedly causes hangs when resizing frames. */ | ||
| 8911 | |||
| 8912 | const char *atom = "_NET_ACTIVE_WINDOW"; | ||
| 8913 | if (f->async_visible && wm_supports (f, atom)) | ||
| 8914 | { | ||
| 8915 | Lisp_Object frame; | ||
| 8916 | XSETFRAME (frame, f); | ||
| 8917 | Fx_send_client_event (frame, make_number (0), frame, | ||
| 8918 | make_unibyte_string (atom, strlen (atom)), | ||
| 8919 | make_number (32), | ||
| 8920 | Fcons (make_number (1), | ||
| 8921 | Fcons (make_number (last_user_time), | ||
| 8922 | Qnil))); | ||
| 8923 | } | ||
| 8924 | else | ||
| 8925 | #endif | ||
| 8926 | x_raise_frame (f); | ||
| 8927 | } | ||
| 8928 | else | 8926 | else |
| 8929 | x_lower_frame (f); | 8927 | x_lower_frame (f); |
| 8930 | } | 8928 | } |
diff --git a/src/xterm.h b/src/xterm.h index 34583221ad3..acfa2cf0d9e 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -989,6 +989,7 @@ extern void x_clear_errors P_ ((Display *)); | |||
| 989 | extern void x_set_window_size P_ ((struct frame *, int, int, int)); | 989 | extern void x_set_window_size P_ ((struct frame *, int, int, int)); |
| 990 | extern void x_set_mouse_position P_ ((struct frame *, int, int)); | 990 | extern void x_set_mouse_position P_ ((struct frame *, int, int)); |
| 991 | extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int)); | 991 | extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int)); |
| 992 | extern void x_ewmh_activate_frame P_ ((struct frame *)); | ||
| 992 | extern void x_raise_frame P_ ((struct frame *)); | 993 | extern void x_raise_frame P_ ((struct frame *)); |
| 993 | extern void x_lower_frame P_ ((struct frame *)); | 994 | extern void x_lower_frame P_ ((struct frame *)); |
| 994 | extern void x_make_frame_visible P_ ((struct frame *)); | 995 | extern void x_make_frame_visible P_ ((struct frame *)); |