aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2015-12-31 11:17:35 +0900
committerYAMAMOTO Mitsuharu2015-12-31 11:17:35 +0900
commit6ee327d8a10047c1717358cc179ed8d1fb3389eb (patch)
tree7ba3a2406a7faafe06637a6823bb239d8ca782e9
parent47580e0d72f53c2fff23cb8edf1487da76e87744 (diff)
downloademacs-6ee327d8a10047c1717358cc179ed8d1fb3389eb.tar.gz
emacs-6ee327d8a10047c1717358cc179ed8d1fb3389eb.zip
Add handle_user_signal_hook
* src/keyboard.h (handle_user_signal_hook): New declaration. * src/keyboard.c (handle_user_signal_hook): New variable. (handle_user_signal): Call it.
-rw-r--r--src/keyboard.c5
-rw-r--r--src/keyboard.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 9ebd86b5356..b0fe328dbd6 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7124,6 +7124,9 @@ struct user_signal_info
7124/* List of user signals. */ 7124/* List of user signals. */
7125static struct user_signal_info *user_signals = NULL; 7125static struct user_signal_info *user_signals = NULL;
7126 7126
7127/* Function called when handling user signals. */
7128void (*handle_user_signal_hook) (int);
7129
7127void 7130void
7128add_user_signal (int sig, const char *name) 7131add_user_signal (int sig, const char *name)
7129{ 7132{
@@ -7172,6 +7175,8 @@ handle_user_signal (int sig)
7172 } 7175 }
7173 7176
7174 p->npending++; 7177 p->npending++;
7178 if (handle_user_signal_hook)
7179 (*handle_user_signal_hook) (sig);
7175#ifdef USABLE_SIGIO 7180#ifdef USABLE_SIGIO
7176 if (interrupt_input) 7181 if (interrupt_input)
7177 handle_input_available_signal (sig); 7182 handle_input_available_signal (sig);
diff --git a/src/keyboard.h b/src/keyboard.h
index 890d24eb2d9..4558bd61414 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -415,6 +415,8 @@ extern void unuse_menu_items (void);
415#define EVENT_HEAD_KIND(event_head) \ 415#define EVENT_HEAD_KIND(event_head) \
416 (Fget ((event_head), Qevent_kind)) 416 (Fget ((event_head), Qevent_kind))
417 417
418extern void (*handle_user_signal_hook) (int);
419
418/* True while doing kbd input. */ 420/* True while doing kbd input. */
419extern bool waiting_for_input; 421extern bool waiting_for_input;
420 422