[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-commit] [commit][master] Add "/me's" command
From: |
mwolson |
Subject: |
[Erc-commit] [commit][master] Add "/me's" command |
Date: |
Sun, 14 Oct 2007 00:49:30 -0400 |
commit b6aee7017492988a0b0c64d90a2675623bf3a85c
Author: Michael W. Olson <address@hidden>
Date: Sat Oct 6 21:43:01 2007 -0400
Add "/me's" command
* erc.el (erc-cmd-ME'S): New command that handles the case where someone
types "/me's". It concatenates the text " 's" to the beginning of the
input and then sends the result like a normal "/me" command.
(erc-command-regexp): Permit single-quote character.
diff --git a/ChangeLog b/ChangeLog
index b686f12..285c045 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-07 Michael Olson <address@hidden>
+
+ * erc.el (erc-cmd-ME'S): New command that handles the case where
+ someone types "/me's". It concatenates the text " 's" to the
+ beginning of the input and then sends the result like a normal
+ "/me" command.
+ (erc-command-regexp): Permit single-quote character.
+
2007-09-30 Aidan Kehoe <address@hidden> (tiny change)
* erc-log.el (erc-save-buffer-in-logs): Prevent spurious warnings
diff --git a/erc.el b/erc.el
index d8459dc..6957e3d 100644
--- a/erc.el
+++ b/erc.el
@@ -3016,6 +3016,11 @@ LINE has the format \"USER ACTION\"."
(t nil)))
(put 'erc-cmd-ME 'do-not-parse-args t)
+(defun erc-cmd-ME\'S (line)
+ "Do a /ME command, but add the string \" 's\" to the beginning."
+ (erc-cmd-ME (concat " 's" line)))
+(put 'erc-cmd-ME\'S 'do-not-parse-args t)
+
(defun erc-cmd-LASTLOG (line)
"Show all lines in the current buffer matching the regexp LINE.
@@ -5035,7 +5040,7 @@ Specifically, return the position of `erc-insert-marker'."
erc-input-marker
(erc-end-of-input-line)))
-(defvar erc-command-regexp "^/\\([A-Za-z]+\\)\\(\\s-+.*\\|\\s-*\\)$"
+(defvar erc-command-regexp "^/\\([A-Za-z']+\\)\\(\\s-+.*\\|\\s-*\\)$"
"Regular expression used for matching commands in ERC.")
(defun erc-send-input (input)