diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 39 | ||||
-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/w32proc.c | 82 | ||||
-rw-r--r-- | src/window.c | 2 | ||||
-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 |
11 files changed, 140 insertions, 61 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f4d6fbc7cb0..ecc56bc21b8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,40 @@ +2007-07-22 Nick Roberts <nickrob@snap.net.nz> + + * xdisp.c (decode_mode_spec): Add case 'R' for to test for + remote default-directory. + + * buffer.c (mode-line-format): Describe above case in doc string. + +2007-07-20 Eli Zaretskii <eliz@gnu.org> + + * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32): + Define if not defined. + +2007-07-18 Jason Rumney <jasonr@gnu.org> + + * w32proc.c (w32_executable_type): Handle 64 bit executables. + +2007-07-18 Richard Stallman <rms@gnu.org> + + * data.c (Fsetq_default): Doc fix. + + * eval.c (Fsetq): Doc fix. + +2007-07-18 Juanma Barranquero <lekktu@gmail.com> + + * coding.c (Ffind_operation_coding_system): + * eval.c (For, Fand): Doc fixes. + Reported by Johan Bockg,Ae(Brd. + +2007-07-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xfns.c (Fx_focus_frame): Call x_ewmh_activate_frame. + + * xterm.h: Declare x_ewmh_activate_frame. + + * xterm.c (x_ewmh_activate_frame): New function. + (XTframe_raise_lower): Move code to x_ewmh_activate_frame. + 2007-07-17 Martin Rudalics <rudalics@gmx.at> * window.c (Fdisplay_buffer): If largest or LRU window is the @@ -8097,7 +8134,7 @@ 2005-09-19 Kim F. Storm <storm@cua.dk> * editfns.c (Fformat): Don't scan past end of format string that - ends in %. Reported by: Johan Bockg,Ae(Brd. + ends in %. Reported by Johan Bockg,Ae(Brd. 2005-09-18 Andreas Schwab <schwab@suse.de> diff --git a/src/buffer.c b/src/buffer.c index 925463a63c3..b401ce97e48 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5517,6 +5517,8 @@ A string is printed verbatim in the mode line except for %-constructs: %P -- print percent of buffer above bottom of window, perhaps plus Top, or print Bottom or All. %n -- print Narrow if appropriate. + %R -- print R or hyphen. R means that default-directory is on a + remote machine. %t -- visited file is text or binary (if OS supports this distinction). %z -- print mnemonics of keyboard, terminal, and buffer coding systems. %Z -- like %z, but including the end-of-line format. diff --git a/src/coding.c b/src/coding.c index e4ecbf50f62..59592fdd09d 100644 --- a/src/coding.c +++ b/src/coding.c @@ -8400,7 +8400,7 @@ contents (not yet decoded). If `file-coding-system-alist' specifies a function to call for FILENAME, that function should examine the contents of BUFFER instead of reading the file. -usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) +usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) (nargs, args) int nargs; Lisp_Object *args; diff --git a/src/data.c b/src/data.c index dd5bc0bcb21..99c38db1395 100644 --- a/src/data.c +++ b/src/data.c @@ -1440,7 +1440,7 @@ More generally, you can use multiple variables and values, as in This sets each VAR's default value to the corresponding VALUE. The VALUE for the Nth VAR can refer to the new default values of previous VARs. -usage: (setq-default [VAR VALUE...]) */) +usage: (setq-default [VAR VALUE]...) */) (args) Lisp_Object args; { @@ -2195,7 +2195,9 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, return Qnil; } -/* Convert between long values and pairs of Lisp integers. */ +/* Convert between long values and pairs of Lisp integers. + Note that long_to_cons returns a single Lisp integer + when the value fits in one. */ Lisp_Object long_to_cons (i) diff --git a/src/eval.c b/src/eval.c index cd0d0fc1c5c..7d7e73484f7 100644 --- a/src/eval.c +++ b/src/eval.c @@ -330,7 +330,7 @@ DEFUN ("or", For, Sor, 0, UNEVALLED, 0, doc: /* Eval args until one of them yields non-nil, then return that value. The remaining args are not evalled at all. If all args return nil, return nil. -usage: (or CONDITIONS ...) */) +usage: (or CONDITIONS...) */) (args) Lisp_Object args; { @@ -355,7 +355,7 @@ DEFUN ("and", Fand, Sand, 0, UNEVALLED, 0, doc: /* Eval args until one of them yields nil, then return nil. The remaining args are not evalled at all. If no arg yields nil, return the last arg's value. -usage: (and CONDITIONS ...) */) +usage: (and CONDITIONS...) */) (args) Lisp_Object args; { @@ -531,7 +531,7 @@ Thus, (setq x (1+ y)) sets `x' to the value of `(1+ y)'. The second VAL is not computed until after the first SYM is set, and so on; each VAL can use the new value of variables set earlier in the `setq'. The return value of the `setq' form is the value of the last VAL. -usage: (setq SYM VAL SYM VAL ...) */) +usage: (setq [SYM VAL]...) */) (args) Lisp_Object args; { diff --git a/src/w32proc.c b/src/w32proc.c index ab768527658..a7c2cff450d 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -591,6 +591,13 @@ get_result: return pid; } +/* Old versions of w32api headers don't have separate 32-bit and + 64-bit defines, but the one they have matches the 32-bit variety. */ +#ifndef IMAGE_NT_OPTIONAL_HDR32_MAGIC +# define IMAGE_NT_OPTIONAL_HDR32_MAGIC IMAGE_NT_OPTIONAL_HDR_MAGIC +# define IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER +#endif + void w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int * is_gui_app) { @@ -651,33 +658,54 @@ w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int } else if (nt_header->Signature == IMAGE_NT_SIGNATURE) { - /* Look for cygwin.dll in DLL import list. */ - IMAGE_DATA_DIRECTORY import_dir = - nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]; - IMAGE_IMPORT_DESCRIPTOR * imports; - IMAGE_SECTION_HEADER * section; - - section = rva_to_section (import_dir.VirtualAddress, nt_header); - imports = RVA_TO_PTR (import_dir.VirtualAddress, section, executable); - - for ( ; imports->Name; imports++) - { - char * dllname = RVA_TO_PTR (imports->Name, section, executable); - - /* The exact name of the cygwin dll has changed with - various releases, but hopefully this will be reasonably - future proof. */ - if (strncmp (dllname, "cygwin", 6) == 0) - { - *is_cygnus_app = TRUE; - break; - } - } - - /* Check whether app is marked as a console or windowed (aka - GUI) app. Accept Posix and OS2 subsytem apps as console - apps. */ - *is_gui_app = (nt_header->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); + IMAGE_DATA_DIRECTORY *data_dir = NULL; + if (nt_header->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) + { + /* Ensure we are using the 32 bit structure. */ + IMAGE_OPTIONAL_HEADER32 *opt + = (IMAGE_OPTIONAL_HEADER32*) &(nt_header->OptionalHeader); + data_dir = opt->DataDirectory; + *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); + } + /* MingW 3.12 has the required 64 bit structs, but in case older + versions don't, only check 64 bit exes if we know how. */ +#ifdef IMAGE_NT_OPTIONAL_HDR64_MAGIC + else if (nt_header->OptionalHeader.Magic + == IMAGE_NT_OPTIONAL_HDR64_MAGIC) + { + IMAGE_OPTIONAL_HEADER64 *opt + = (IMAGE_OPTIONAL_HEADER64*) &(nt_header->OptionalHeader); + data_dir = opt->DataDirectory; + *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI); + } +#endif + if (data_dir) + { + /* Look for cygwin.dll in DLL import list. */ + IMAGE_DATA_DIRECTORY import_dir = + data_dir[IMAGE_DIRECTORY_ENTRY_IMPORT]; + IMAGE_IMPORT_DESCRIPTOR * imports; + IMAGE_SECTION_HEADER * section; + + section = rva_to_section (import_dir.VirtualAddress, nt_header); + imports = RVA_TO_PTR (import_dir.VirtualAddress, section, + executable); + + for ( ; imports->Name; imports++) + { + char * dllname = RVA_TO_PTR (imports->Name, section, + executable); + + /* The exact name of the cygwin dll has changed with + various releases, but hopefully this will be reasonably + future proof. */ + if (strncmp (dllname, "cygwin", 6) == 0) + { + *is_cygnus_app = TRUE; + break; + } + } + } } } diff --git a/src/window.c b/src/window.c index 59b70152b09..fc60b72d937 100644 --- a/src/window.c +++ b/src/window.c @@ -7602,4 +7602,4 @@ keys_of_window () } /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f - (do not change thisc omment) */ + (do not change this comment) */ diff --git a/src/xdisp.c b/src/xdisp.c index 05898c51512..c8c519107ac 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18144,6 +18144,16 @@ decode_mode_spec (w, c, field_width, precision, multibyte) #endif break; + case 'R': + { + Lisp_Object val; + val = call1 (intern ("file-remote-p"), current_buffer->directory); + if (NILP (val)) + return "-"; + else + return "@"; + } + case 't': /* indicate TEXT or BINARY */ #ifdef MODE_LINE_BINARY_TEXT return MODE_LINE_BINARY_TEXT (b); diff --git a/src/xfns.c b/src/xfns.c index c90c4eb9cfc..b48a5432a86 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3717,6 +3717,7 @@ FRAME nil means use the selected frame. */) x_catch_errors (dpy); XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), RevertToParent, CurrentTime); + x_ewmh_activate_frame (f); x_uncatch_errors (); UNBLOCK_INPUT; diff --git a/src/xterm.c b/src/xterm.c index 51d40f2a4d4..d2fb432e82e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9144,38 +9144,36 @@ x_lower_frame (f) } } +/* Activate frame with Extended Window Manager Hints */ + +void +x_ewmh_activate_frame (f) + FRAME_PTR f; +{ + /* See Window Manager Specification/Extended Window Manager Hints at + http://freedesktop.org/wiki/Standards_2fwm_2dspec */ + + const char *atom = "_NET_ACTIVE_WINDOW"; + if (f->async_visible && wm_supports (f, atom)) + { + Lisp_Object frame; + XSETFRAME (frame, f); + Fx_send_client_event (frame, make_number (0), frame, + make_unibyte_string (atom, strlen (atom)), + make_number (32), + Fcons (make_number (1), + Fcons (make_number (last_user_time), + Qnil))); + } +} + static void XTframe_raise_lower (f, raise_flag) FRAME_PTR f; int raise_flag; { if (raise_flag) - { - /* The following code is needed for `raise-frame' to work on - some versions of metacity; see Window Manager - Specification/Extended Window Manager Hints at - http://freedesktop.org/wiki/Standards_2fwm_2dspec */ - -#if 0 - /* However, on other versions (metacity 2.17.2-1.fc7), it - reportedly causes hangs when resizing frames. */ - - const char *atom = "_NET_ACTIVE_WINDOW"; - if (f->async_visible && wm_supports (f, atom)) - { - Lisp_Object frame; - XSETFRAME (frame, f); - Fx_send_client_event (frame, make_number (0), frame, - make_unibyte_string (atom, strlen (atom)), - make_number (32), - Fcons (make_number (1), - Fcons (make_number (last_user_time), - Qnil))); - } - else -#endif - x_raise_frame (f); - } + x_raise_frame (f); else x_lower_frame (f); } diff --git a/src/xterm.h b/src/xterm.h index 141f58168e1..c607080a5dc 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -999,6 +999,7 @@ extern void x_fully_uncatch_errors P_ ((void)); extern void x_set_window_size P_ ((struct frame *, int, int, int)); extern void x_set_mouse_position P_ ((struct frame *, int, int)); extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int)); +extern void x_ewmh_activate_frame P_ ((struct frame *)); extern void x_raise_frame P_ ((struct frame *)); extern void x_lower_frame P_ ((struct frame *)); extern void x_make_frame_visible P_ ((struct frame *)); |