Now on revision 110827. ------------------------------------------------------------ revno: 110827 committer: Michael Albinus + + * os.texi (Notifications): Update descriptions of + notifications-notify, notifications-close-notification and + notifications-get-capabilities according to latest code changes. + Add notifications-get-server-information. + 2012-11-03 Chong Yidong * objects.texi (General Escape Syntax): Clarify the explanation of === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2012-10-24 05:12:23 +0000 +++ doc/lispref/os.texi 2012-11-08 07:50:43 +0000 @@ -2276,13 +2276,19 @@ The supported keywords and values are as follows: @table @code +@item :bus @var{bus} +The D-Bus bus. This argument is needed only if a bus other than +@code{:session} shall be used. + @item :title @var{title} The notification title. @item :body @var{text} The notification body text. Depending on the implementation of the notification server, the text could contain HTML markups, like -@samp{"bold text"}, hyperlinks, or images. +@samp{"bold text"}, hyperlinks, or images. Special HTML +characters must be encoded, as @samp{"Contact +<postmaster@@localhost>!"}. @item :app-name @var{name} The name of the application sending the notification. The default is @@ -2317,7 +2323,10 @@ interpreted as icon name. @item :category @var{category} -The type of notification this is, a string. +The type of notification this is, a string. See the +@uref{http://developer.gnome.org/notification-spec/#categories, +Desktop Notifications Specification} for a list of standard +categories. @item :desktop-entry @var{filename} This specifies the name of the desktop filename representing the @@ -2420,13 +2429,17 @@ @end example @end defun -@defun notifications-close-notification id +@defun notifications-close-notification id &optional bus This function closes a notification with identifier @var{id}. +@var{bus} can be a string denoting a D-Bus connection, the default is +@code{:session}. @end defun -@defun notifications-get-capabilities -Returns the capabilities of the notification server, a list of strings. -The following capabilities can be expected: +@defun notifications-get-capabilities &optional bus +Returns the capabilities of the notification server, a list of +symbols. @var{bus} can be a string denoting a D-Bus connection, the +default is @code{:session}. The following capabilities can be +expected: @table @code @item :actions @@ -2463,6 +2476,30 @@ @code{:x-gnome-foo-cap}. @end defun +@defun notifications-get-server-information &optional bus +Return information on the notification server, a list of strings. +@var{bus} can be a string denoting a D-Bus connection, the default is +@code{:session}. The returned list is @code{(@var{name} @var{vendor} +@var{version} @var{spec-version})}. + +@table @var +@item name +The product name of the server. + +@item vendor +The vendor name. For example, @samp{"KDE"}, @samp{"GNOME"}. + +@item version +The server's version number. + +@item spec-version +The specification version the server is compliant with. +@end table + +If @var{SPEC_VERSION} is @code{nil}, the server supports a +specification prior to @samp{"1.0"}. +@end defun + @node Dynamic Libraries @section Dynamically Loaded Libraries ------------------------------------------------------------ revno: 110826 fixes bug: http://debbugs.gnu.org/12806 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2012-11-07 23:48:18 +0200 message: Fix Num Lock handling related to bug #12806. src/w32fns.c (modifier_set): Don't include Num Lock in the reported modifiers. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-07 21:12:25 +0000 +++ src/ChangeLog 2012-11-07 21:48:18 +0000 @@ -3,8 +3,7 @@ * w32fns.c (modifier_set): Don't report modifiers from toggle key, such as Scroll Lock, if the respective keys are treated as function keys, not as modifiers. This avoids destroying non-ASCII - keyboard input when Scroll Lock is toggled ON. (Bug#1280) - (modifier_set): Do not omit checking the Num Lock key. + keyboard input when Scroll Lock is toggled ON. (Bug#12806) 2012-11-07 Dmitry Antipov === modified file 'src/w32fns.c' --- src/w32fns.c 2012-11-07 21:12:25 +0000 +++ src/w32fns.c 2012-11-07 21:48:18 +0000 @@ -2099,13 +2099,6 @@ else return (GetKeyState (vkey) & 0x1); } - if (vkey == VK_NUMLOCK) - { - if (NILP (Vw32_enable_num_lock)) - return 0; - else - return (GetKeyState (vkey) & 0x1); - } if (!modifiers_recorded) return (GetKeyState (vkey) & 0x8000); ------------------------------------------------------------ revno: 110825 fixes bug: http://debbugs.gnu.org/1280 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2012-11-07 23:12:25 +0200 message: A (hopefully) better fix for bug #1280. src/w32fns.c (modifier_set): Don't report modifiers from toggle key, such as Scroll Lock, if the respective keys are treated as function keys, not as modifiers. This avoids destroying non-ASCII keyboard input when Scroll Lock is toggled ON. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-07 17:33:14 +0000 +++ src/ChangeLog 2012-11-07 21:12:25 +0000 @@ -1,10 +1,9 @@ 2012-11-07 Eli Zaretskii - * w32fns.c (w32_wnd_proc): Don't directly handle key chords - including modifiers from toggle key, such as Scroll Lock, if the - respective keys are treated as function keys, not as modifiers. - This avoids destroying non-ASCII keyboard input when Scroll Lock - is toggled ON. (Bug#1280) + * w32fns.c (modifier_set): Don't report modifiers from toggle key, + such as Scroll Lock, if the respective keys are treated as + function keys, not as modifiers. This avoids destroying non-ASCII + keyboard input when Scroll Lock is toggled ON. (Bug#1280) (modifier_set): Do not omit checking the Num Lock key. 2012-11-07 Dmitry Antipov === modified file 'src/w32fns.c' --- src/w32fns.c 2012-11-07 17:33:14 +0000 +++ src/w32fns.c 2012-11-07 21:12:25 +0000 @@ -2085,8 +2085,28 @@ static int modifier_set (int vkey) { - if (vkey == VK_CAPITAL || vkey == VK_SCROLL || vkey == VK_NUMLOCK) - return (GetKeyState (vkey) & 0x1); + if (vkey == VK_CAPITAL) + { + if (NILP (Vw32_enable_caps_lock)) + return 0; + else + return (GetKeyState (vkey) & 0x1); + } + if (vkey == VK_SCROLL) + { + if (NILP (Vw32_scroll_lock_modifier)) + return 0; + else + return (GetKeyState (vkey) & 0x1); + } + if (vkey == VK_NUMLOCK) + { + if (NILP (Vw32_enable_num_lock)) + return 0; + else + return (GetKeyState (vkey) & 0x1); + } + if (!modifiers_recorded) return (GetKeyState (vkey) & 0x8000); @@ -2974,21 +2994,12 @@ { DWORD modifiers = construct_console_modifiers (); - /* Always let TranslateMessage handle AltGr key chords; - for some reason, ToAscii doesn't always process AltGr - chords correctly. */ - if ((!NILP (Vw32_recognize_altgr) - && modifier_set (VK_LCONTROL) && modifier_set (VK_RMENU)) - /* If a toggle key is used as a function key, let - TranslateMessage handle keys pressed while the - toggled key is ON. This avoids munging non-ASCII - keys, like interpreting them as ASCII keys below, - when, e.g., Scroll Lock is toggled ON. */ - || (NILP (Vw32_scroll_lock_modifier) - && modifier_set (VK_SCROLL)) - || (NILP (Vw32_enable_num_lock) && modifier_set (VK_NUMLOCK)) - || (NILP (Vw32_enable_caps_lock) && modifier_set (VK_CAPITAL))) + if (!NILP (Vw32_recognize_altgr) + && modifier_set (VK_LCONTROL) && modifier_set (VK_RMENU)) { + /* Always let TranslateMessage handle AltGr key chords; + for some reason, ToAscii doesn't always process AltGr + chords correctly. */ windows_translate = 1; } else if ((modifiers & (~SHIFT_PRESSED & ~CAPSLOCK_ON)) != 0) ------------------------------------------------------------ revno: 110824 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2012-11-07 19:33:14 +0200 message: Include Num Lock in test for modifier keys on MS-Windows. src/w32fns.c (modifier_set): Do not omit checking the Num Lock key. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-07 16:44:48 +0000 +++ src/ChangeLog 2012-11-07 17:33:14 +0000 @@ -5,6 +5,7 @@ respective keys are treated as function keys, not as modifiers. This avoids destroying non-ASCII keyboard input when Scroll Lock is toggled ON. (Bug#1280) + (modifier_set): Do not omit checking the Num Lock key. 2012-11-07 Dmitry Antipov === modified file 'src/w32fns.c' --- src/w32fns.c 2012-11-07 16:44:48 +0000 +++ src/w32fns.c 2012-11-07 17:33:14 +0000 @@ -2085,7 +2085,7 @@ static int modifier_set (int vkey) { - if (vkey == VK_CAPITAL || vkey == VK_SCROLL) + if (vkey == VK_CAPITAL || vkey == VK_SCROLL || vkey == VK_NUMLOCK) return (GetKeyState (vkey) & 0x1); if (!modifiers_recorded) return (GetKeyState (vkey) & 0x8000); ------------------------------------------------------------ revno: 110823 committer: Michael Albinus + + * notifications.el (notifications-get-server-information-method): + New defconst. + (notifications-get-capabilities): Fix docstring. + (notifications-get-server-information): New defun. + 2012-11-06 Agustín Martín Domingo * textmodes/ispell.el (ispell-region): Standard re-indent for better === modified file 'lisp/notifications.el' --- lisp/notifications.el 2012-07-27 10:56:03 +0000 +++ lisp/notifications.el 2012-11-07 16:55:39 +0000 @@ -66,6 +66,9 @@ (defconst notifications-get-capabilities-method "GetCapabilities" "D-Bus notifications get capabilities method.") +(defconst notifications-get-server-information-method "GetServerInformation" + "D-Bus notifications get server information method.") + (defconst notifications-action-signal "ActionInvoked" "D-Bus notifications action signal.") @@ -349,7 +352,7 @@ (defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors (defun notifications-get-capabilities (&optional bus) - "Return the capabilities of the notification server, a list of strings. + "Return the capabilities of the notification server, a list of symbols. BUS can be a string denoting a D-Bus connection, the default is `:session'. The following capabilities can be expected: @@ -371,12 +374,34 @@ Further vendor-specific caps start with `:x-vendor', like `:x-gnome-foo-cap'." (dbus-ignore-errors - (mapcar - (lambda (x) (intern (concat ":" x))) + (mapcar + (lambda (x) (intern (concat ":" x))) + (dbus-call-method (or bus :session) + notifications-service + notifications-path + notifications-interface + notifications-get-capabilities-method)))) + +(defun notifications-get-server-information (&optional bus) + "Return information on the notification server, a list of strings. +BUS can be a string denoting a D-Bus connection, the default is `:session'. +The returned list is (NAME VENDOR VERSION SPEC-VERSION). + + NAME The product name of the server. + VENDOR The vendor name. For example, \"KDE\", \"GNOME\". + VERSION The server's version number. + SPEC-VERSION The specification version the server is compliant with. + +If SPEC_VERSION is missing, the server supports a specification +prior to \"1.0\". + +See `notifications-specification-version' for the specification +version this library is compliant with." + (dbus-ignore-errors (dbus-call-method (or bus :session) notifications-service notifications-path notifications-interface - notifications-get-capabilities-method)))) + notifications-get-server-information-method))) (provide 'notifications) ------------------------------------------------------------ revno: 110822 fixes bug: http://debbugs.gnu.org/1280 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2012-11-07 18:44:48 +0200 message: Fix bug #1280 with non-ASCII keyboard input on MS-Windows. src/w32fns.c (w32_wnd_proc): Don't directly handle key chords including modifiers from toggle key, such as Scroll Lock, if the respective keys are treated as function keys, not as modifiers. This avoids destroying non-ASCII keyboard input when Scroll Lock is toggled ON. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-07 05:23:20 +0000 +++ src/ChangeLog 2012-11-07 16:44:48 +0000 @@ -1,3 +1,11 @@ +2012-11-07 Eli Zaretskii + + * w32fns.c (w32_wnd_proc): Don't directly handle key chords + including modifiers from toggle key, such as Scroll Lock, if the + respective keys are treated as function keys, not as modifiers. + This avoids destroying non-ASCII keyboard input when Scroll Lock + is toggled ON. (Bug#1280) + 2012-11-07 Dmitry Antipov * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring. === modified file 'src/w32fns.c' --- src/w32fns.c 2012-11-06 13:26:20 +0000 +++ src/w32fns.c 2012-11-07 16:44:48 +0000 @@ -2974,12 +2974,21 @@ { DWORD modifiers = construct_console_modifiers (); - if (!NILP (Vw32_recognize_altgr) - && modifier_set (VK_LCONTROL) && modifier_set (VK_RMENU)) + /* Always let TranslateMessage handle AltGr key chords; + for some reason, ToAscii doesn't always process AltGr + chords correctly. */ + if ((!NILP (Vw32_recognize_altgr) + && modifier_set (VK_LCONTROL) && modifier_set (VK_RMENU)) + /* If a toggle key is used as a function key, let + TranslateMessage handle keys pressed while the + toggled key is ON. This avoids munging non-ASCII + keys, like interpreting them as ASCII keys below, + when, e.g., Scroll Lock is toggled ON. */ + || (NILP (Vw32_scroll_lock_modifier) + && modifier_set (VK_SCROLL)) + || (NILP (Vw32_enable_num_lock) && modifier_set (VK_NUMLOCK)) + || (NILP (Vw32_enable_caps_lock) && modifier_set (VK_CAPITAL))) { - /* Always let TranslateMessage handle AltGr key chords; - for some reason, ToAscii doesn't always process AltGr - chords correctly. */ windows_translate = 1; } else if ((modifiers & (~SHIFT_PRESSED & ~CAPSLOCK_ON)) != 0) ------------------------------------------------------------ revno: 110821 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2012-11-07 09:23:20 +0400 message: * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-06 20:48:35 +0000 +++ src/ChangeLog 2012-11-07 05:23:20 +0000 @@ -1,3 +1,7 @@ +2012-11-07 Dmitry Antipov + + * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring. + 2012-11-06 Paul Eggert Restore some duplicate definitions (Bug#12814). === modified file 'src/xfns.c' --- src/xfns.c 2012-11-06 13:26:20 +0000 +++ src/xfns.c 2012-11-07 05:23:20 +0000 @@ -2996,16 +2996,14 @@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint, 0, 1, 0, doc: /* Send the size hints for frame FRAME to the window manager. -If FRAME is nil, use the selected frame. */) +If FRAME is omitted or nil, use the selected frame. +Signal error if FRAME is not an X frame. */) (Lisp_Object frame) { - struct frame *f; - if (NILP (frame)) - frame = selected_frame; - f = XFRAME (frame); + struct frame *f = check_x_frame (frame); + block_input (); - if (FRAME_X_P (f)) - x_wm_set_size_hint (f, 0, 0); + x_wm_set_size_hint (f, 0, 0); unblock_input (); return Qnil; }