]> git.eshelyaron.com Git - emacs.git/commitdiff
Respond to default action from Gnus notifications
authorPo Lu <luangruo@yahoo.com>
Sat, 16 Mar 2024 07:15:10 +0000 (15:15 +0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 18 Mar 2024 15:43:17 +0000 (16:43 +0100)
* lisp/gnus/gnus-notifications.el (gnus-notifications-action):
Consider default equivalent to read.

(cherry picked from commit 28e481bf7af873cdaf016e25855a8e0ebc424fe7)

lisp/gnus/gnus-notifications.el
src/androidterm.c

index 35f90ebfe4060f22b6230cfbd1cf9ab7cd48f739..e4c3d2c0381c1d052299425750d25380334b3111 100644 (file)
@@ -75,10 +75,11 @@ not get notifications."
     (when group-article
       (let ((group (cadr group-article))
             (article (nth 2 group-article)))
-        (cond ((string= key "read")
+        (cond ((or (equal key "read")
+                   (equal key "default"))
                (gnus-fetch-group group (list article))
                (select-frame-set-input-focus (selected-frame)))
-              ((string= key "mark-read")
+              ((equal key "mark-read")
                (gnus-update-read-articles
                 group
                 (delq article (gnus-list-of-unread-articles group)))
index 9948a2919d87df19bd8d6801dc35fccdd649f428..ba9b6d3b8a97b532281baccf24c34821c7945a37 100644 (file)
@@ -376,11 +376,11 @@ android_android_to_emacs_modifiers (struct android_display_info *dpyinfo,
   tem = Fget (Vx_super_keysym, Qmodifier_value);
   if (FIXNUMP (tem)) mod_super = XFIXNUM (tem) & INT_MAX;
 
-  return (((state & ANDROID_CONTROL_MASK) ? mod_ctrl  : 0)
-         | ((state & ANDROID_SHIFT_MASK) ? mod_shift : 0)
-         | ((state & ANDROID_ALT_MASK)   ? mod_meta  : 0)
-         | ((state & ANDROID_SUPER_MASK) ? mod_super : 0)
-         | ((state & ANDROID_META_MASK)  ? mod_alt   : 0));
+  return (((state & ANDROID_CONTROL_MASK) ? mod_ctrl           : 0)
+         | ((state & ANDROID_SHIFT_MASK) ? shift_modifier      : 0)
+         | ((state & ANDROID_ALT_MASK)   ? mod_meta            : 0)
+         | ((state & ANDROID_SUPER_MASK) ? mod_super           : 0)
+         | ((state & ANDROID_META_MASK)  ? mod_alt             : 0));
 }
 
 static int
@@ -402,11 +402,11 @@ android_emacs_to_android_modifiers (struct android_display_info *dpyinfo,
   tem = Fget (Vx_super_keysym, Qmodifier_value);
   if (FIXNUMP (tem)) mod_super = XFIXNUM (tem);
 
-  return (((state & mod_ctrl)    ? ANDROID_CONTROL_MASK : 0)
-         | ((state & mod_shift) ? ANDROID_SHIFT_MASK   : 0)
-         | ((state & mod_meta)  ? ANDROID_ALT_MASK     : 0)
-         | ((state & mod_super) ? ANDROID_SUPER_MASK   : 0)
-         | ((state & mod_alt)   ? ANDROID_META_MASK    : 0));
+  return (((state & mod_ctrl)          ? ANDROID_CONTROL_MASK : 0)
+         | ((state & shift_modifier)   ? ANDROID_SHIFT_MASK   : 0)
+         | ((state & mod_meta)         ? ANDROID_ALT_MASK     : 0)
+         | ((state & mod_super)        ? ANDROID_SUPER_MASK   : 0)
+         | ((state & mod_alt)          ? ANDROID_META_MASK    : 0));
 }
 
 static void android_frame_rehighlight (struct android_display_info *);