aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/erc
diff options
context:
space:
mode:
authorMiles Bader2006-02-12 12:02:53 +0000
committerMiles Bader2006-02-12 12:02:53 +0000
commit9cc8d0b62e2f9cc8aa5754aafaf359fdfc28edef (patch)
treeffe234ff4943c026a8c304005aca02a42d96061c /lisp/erc
parentf828c6fc00bac67e28840637346ddc47b5b6ee2d (diff)
downloademacs-9cc8d0b62e2f9cc8aa5754aafaf359fdfc28edef.tar.gz
emacs-9cc8d0b62e2f9cc8aa5754aafaf359fdfc28edef.zip
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-73
Creator: Michael Olson <mwolson@gnu.org> Merge from erc--emacs--0
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/ChangeLog57
-rw-r--r--lisp/erc/erc-dcc.el2
-rw-r--r--lisp/erc/erc-list.el21
-rw-r--r--lisp/erc/erc-match.el18
-rw-r--r--lisp/erc/erc-menu.el4
-rw-r--r--lisp/erc/erc-spelling.el6
-rw-r--r--lisp/erc/erc-stamp.el53
-rw-r--r--lisp/erc/erc-xdcc.el2
-rw-r--r--lisp/erc/erc.el120
9 files changed, 177 insertions, 106 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 50b37eb044f..6abf4021a60 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,60 @@
12006-02-11 Michael Olson <mwolson@gnu.org>
2
3 * erc.el (erc-update-modules): Make some requirements shorter, so
4 that it's easier to see why they are needed.
5
6 * erc-stamp.el (erc-timestamp-use-align-to): Renamed from
7 `erc-timestamp-right-align-by-pixel'. Set the default based on
8 whether we are in Emacs 22, and using X. Improve documentation.
9 (erc-insert-aligned): Remove calculation of offset, since
10 :align-to pos works after all. Unlike the previous solution, this
11 one works when erc-stamp.el is compiled.
12 (erc-insert-timestamp-right): Don't add length of string, and then
13 later remove its displayed width. This puts timestamps after
14 erc-fill-column when erc-timestamp-right-column is nil, rather
15 than before it. It also fixes a subtle bug. Remove use of
16 `current-window', since there is no variable by that name in
17 Emacs21, Emacs22, or XEmacs21 beta. Check to see whether
18 `erc-fill-column' is non-nil before using it.
19
202006-02-11 Diane Murray <disumu@x3y2z1.net>
21
22 * erc-list.el: Define `list' module which sets the alias
23 `erc-cmd-LIST' to `erc-list-channels' when enabled and
24 `erc-list-channels-simple' when disabled.
25 (erc-list-channels): Was `erc-cmd-LIST', renamed.
26 (erc-list-channels-simple): New function.
27
28 * erc.el (erc-modules): Added `list' to enabled modules. Moved
29 customization options left in source code.
30
31 * erc-menu.el (erc-menu-definition): Use `erc-list-channels'.
32
33 * erc-spelling.el (define-erc-module): Make sure there's a buffer
34 before calling `with-current-buffer'.
35
362006-02-10 Michael Olson <mwolson@gnu.org>
37
38 * Makefile (debbuild): Split from debrelease.
39 (debrevision-mwolson): New rule that causes a Debian revision to
40 be built.
41
42 * erc.el (erc-migrate-modules): Use a better algorithm. Thanks to
43 Johan Bockgård.
44 (erc-modules): Change use of 'pcomplete to 'completion.
45
462006-02-09 Diane Murray <disumu@x3y2z1.net>
47
48 * erc.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
49 (erc-get-parsed-vector-type): Moved here from erc-match.el.
50
51 * erc-match.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
52 (erc-get-parsed-vector-type): Moved these functions to erc.el
53 since they can be useful outside of the text matching module.
54
55 * erc-dcc.el, erc-stamp.el, erc-xdcc.el: Changed "Emacs IRC Client"
56 to "ERC".
57
12006-02-07 Michael Olson <mwolson@gnu.org> 582006-02-07 Michael Olson <mwolson@gnu.org>
2 59
3 * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04, 60 * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04,
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index d5789a51708..0848b202e1c 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -29,7 +29,7 @@
29 29
30;;; Commentary: 30;;; Commentary:
31 31
32;; This file provides Direct Client-to-Client support for the Emacs IRC Client. 32;; This file provides Direct Client-to-Client support for ERC.
33;; 33;;
34;; The original code was taken from zenirc-dcc.el, heavily mangled and 34;; The original code was taken from zenirc-dcc.el, heavily mangled and
35;; rewritten to support the way how ERC operates. Server socket support 35;; rewritten to support the way how ERC operates. Server socket support
diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el
index 9bc561523d9..2243a2f4985 100644
--- a/lisp/erc/erc-list.el
+++ b/lisp/erc/erc-list.el
@@ -140,12 +140,19 @@ display the channel list."
140 (setq truncate-lines t) 140 (setq truncate-lines t)
141 (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local)) 141 (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local))
142 142
143;; Define module:
144;;;###autoload (autoload 'erc-list-mode "erc-list")
145(define-erc-module list nil
146 "List channels nicely in a separate buffer."
147 ((defalias 'erc-cmd-LIST 'erc-list-channels))
148 ((defalias 'erc-cmd-LIST 'erc-list-channels-simple)))
149
143;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 150;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
144;; Functions. 151;; Functions.
145;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 152;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
146 153
147;;;###autoload 154;;;###autoload
148(defun erc-cmd-LIST (&rest channel) 155(defun erc-list-channels (&rest channel)
149 "Display a buffer containing a list of channels on the current server. 156 "Display a buffer containing a list of channels on the current server.
150Optional argument CHANNEL specifies a single channel to list (instead of every 157Optional argument CHANNEL specifies a single channel to list (instead of every
151available channel)." 158available channel)."
@@ -163,6 +170,18 @@ available channel)."
163 (erc-chanlist channel)) 170 (erc-chanlist channel))
164 t) 171 t)
165 172
173(defun erc-list-channels-simple (&optional line)
174 "Send the LIST command to the current server with optional channels LINE."
175 (when (string-match "^\\s-*\\(.*\\)$" line)
176 (let ((channels (match-string 1 line)))
177 (erc-log (format "cmd: LIST: %s" channels))
178 (erc-server-send
179 (if (string= channels "")
180 "LIST"
181 (concat "LIST :" channels))))
182 t))
183(put 'erc-list-channels-simple 'do-not-parse-args t)
184
166;;;###autoload 185;;;###autoload
167(defun erc-chanlist (&optional channels) 186(defun erc-chanlist (&optional channels)
168 "Show a channel listing of the current server in a special mode. 187 "Show a channel listing of the current server in a special mode.
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index a5e3bf88ccf..ad875ceee99 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -428,24 +428,6 @@ In any of the following situations, MSG is directed at an entry FOOL:
428 (or (erc-list-match fools-beg msg) 428 (or (erc-list-match fools-beg msg)
429 (erc-list-match fools-end msg)))) 429 (erc-list-match fools-end msg))))
430 430
431(defun erc-get-parsed-vector (point)
432 "Return the whole parsed vector on POINT."
433 (get-text-property point 'erc-parsed))
434
435(defun erc-get-parsed-vector-nick (vect)
436 "Return nickname in the parsed vector VECT."
437 (let* ((untreated-nick (and vect (erc-response.sender vect)))
438 (maybe-nick (when untreated-nick
439 (car (split-string untreated-nick "!")))))
440 (when (and (not (null maybe-nick))
441 (erc-is-valid-nick-p maybe-nick))
442 untreated-nick)))
443
444(defun erc-get-parsed-vector-type (vect)
445 "Return message type in the parsed vector VECT."
446 (and vect
447 (erc-response.command vect)))
448
449(defun erc-match-message () 431(defun erc-match-message ()
450 "Mark certain keywords in a region. 432 "Mark certain keywords in a region.
451Use this defun with `erc-insert-modify-hook'." 433Use this defun with `erc-insert-modify-hook'."
diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el
index 8e1f81adf75..36c28b740f2 100644
--- a/lisp/erc/erc-menu.el
+++ b/lisp/erc/erc-menu.el
@@ -36,8 +36,8 @@
36 ["Connect to server..." erc-select t] 36 ["Connect to server..." erc-select t]
37 ["Disconnect from server..." erc-quit-server erc-server-connected] 37 ["Disconnect from server..." erc-quit-server erc-server-connected]
38 "-" 38 "-"
39 ["List channels..." erc-cmd-LIST 39 ["List channels..." erc-list-channels
40 (and erc-server-connected (fboundp 'erc-cmd-LIST))] 40 (and erc-server-connected (fboundp 'erc-list-channels))]
41 ["Join channel..." erc-join-channel erc-server-connected] 41 ["Join channel..." erc-join-channel erc-server-connected]
42 ["Start a query..." erc-cmd-QUERY erc-server-connected] 42 ["Start a query..." erc-cmd-QUERY erc-server-connected]
43 "-" 43 "-"
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index 41e342c0e50..528668f4829 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -41,11 +41,13 @@
41 ;; called AFTER the server buffer is initialized. 41 ;; called AFTER the server buffer is initialized.
42 ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) 42 ((add-hook 'erc-connect-pre-hook 'erc-spelling-init)
43 (mapc (lambda (buffer) 43 (mapc (lambda (buffer)
44 (with-current-buffer buffer (erc-spelling-init))) 44 (when buffer
45 (with-current-buffer buffer (erc-spelling-init))))
45 (erc-buffer-list))) 46 (erc-buffer-list)))
46 ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) 47 ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)
47 (mapc (lambda (buffer) 48 (mapc (lambda (buffer)
48 (with-current-buffer buffer (flyspell-mode 0))) 49 (when buffer
50 (with-current-buffer buffer (flyspell-mode 0))))
49 (erc-buffer-list)))) 51 (erc-buffer-list))))
50 52
51(defcustom erc-spelling-dictionaries nil 53(defcustom erc-spelling-dictionaries nil
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index ead847ff73f..e5d4250d142 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -1,4 +1,4 @@
1;;; erc-stamp.el --- Timestamping for Emacs IRC CLient 1;;; erc-stamp.el --- Timestamping for ERC messages
2 2
3;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
4 4
@@ -180,11 +180,17 @@ the correct column."
180 (integer :tag "Column number") 180 (integer :tag "Column number")
181 (const :tag "Unspecified" nil))) 181 (const :tag "Unspecified" nil)))
182 182
183(defcustom erc-timestamp-right-align-by-pixel nil 183(defcustom erc-timestamp-use-align-to (and (not (featurep 'xemacs))
184 "*If non-nil, insert the right timestamp based on a pixel value. 184 (>= emacs-major-version 22)
185This is needed when variable-width text precedes a timestamp. 185 (eq window-system 'x))
186 "*If non-nil, use the :align-to display property to align the stamp.
187This gives better results when variable-width characters (like
188Asian language characters and math symbols) precede a timestamp.
186Unfortunately, it only works in Emacs 22 and when using the X 189Unfortunately, it only works in Emacs 22 and when using the X
187Window System." 190Window System.
191
192A side effect of enabling this is that there will only be one
193space before a right timestamp in any saved logs."
188 :group 'erc-stamp 194 :group 'erc-stamp
189 :type 'boolean) 195 :type 'boolean)
190 196
@@ -200,18 +206,15 @@ Window System."
200 (insert s))) 206 (insert s)))
201 207
202(defun erc-insert-aligned (string pos) 208(defun erc-insert-aligned (string pos)
203 "Insert STRING based on a fraction of the width of the buffer. 209 "Insert STRING at the POSth column.
204Fraction is roughly (/ POS (window-width)).
205 210
206If `erc-timestamp-right-align-by-pixel' is nil, insert STRING at the 211If `erc-timestamp-use-align-to' is t, use the :align-to display
207POSth column, without using pixel coordinates." 212property to get to the POSth column."
208 (if (not erc-timestamp-right-align-by-pixel) 213 (if (not erc-timestamp-use-align-to)
209 (indent-to pos) 214 (indent-to pos)
210 (insert " ") 215 (insert " ")
211 (let ((offset (floor (* (/ (1- pos) (window-width) 1.0) 216 (put-text-property (1- (point)) (point) 'display
212 (nth 2 (window-inside-pixel-edges)))))) 217 (list 'space ':align-to pos)))
213 (put-text-property (1- (point)) (point) 'display
214 `(space :align-to (,offset)))))
215 (insert string)) 218 (insert string))
216 219
217(defun erc-insert-timestamp-right (string) 220(defun erc-insert-timestamp-right (string)
@@ -238,30 +241,26 @@ be printed just before the window-width."
238 (forward-char -1);; before the last newline 241 (forward-char -1);; before the last newline
239 (let* ((current-window (get-buffer-window (current-buffer))) 242 (let* ((current-window (get-buffer-window (current-buffer)))
240 (pos (cond 243 (pos (cond
241 (erc-timestamp-right-column 244 (erc-timestamp-right-column erc-timestamp-right-column)
242 (+ erc-timestamp-right-column (length string)))
243 ((and (boundp 'erc-fill-mode) 245 ((and (boundp 'erc-fill-mode)
244 erc-fill-mode 246 erc-fill-mode
245 (boundp 'erc-fill-column)) 247 (boundp 'erc-fill-column)
248 erc-fill-column)
246 (1+ erc-fill-column)) 249 (1+ erc-fill-column))
247 (current-window
248 (- (window-width current-window)
249 1))
250 (fill-column 250 (fill-column
251 (1+ fill-column)) 251 (1+ fill-column))
252 (t 252 (t
253 (- (window-width) 253 (- (window-width)
254 (string-width string)
254 1)))) 255 1))))
255 (from (point)) 256 (from (point))
256 (col (current-column)) 257 (col (current-column))
257 indent) 258 indent)
258 ;; deal with variable-width characters 259 ;; The following is a kludge used to calculate whether to move
259 (setq pos (- pos (string-width string)) 260 ;; to the next line before inserting a stamp. It allows for
260 ;; The following is a kludge that works with most 261 ;; some margin of error if what is displayed on the line differs
261 ;; international input. It is now only used to calculate 262 ;; from the number of characters on the line.
262 ;; whether to move to the next line before inserting a 263 (setq col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6))))
263 ;; stamp.
264 col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6))))
265 (if (< col pos) 264 (if (< col pos)
266 (erc-insert-aligned string pos) 265 (erc-insert-aligned string pos)
267 (newline) 266 (newline)
diff --git a/lisp/erc/erc-xdcc.el b/lisp/erc/erc-xdcc.el
index 7c8ee6fff62..84562e72c2c 100644
--- a/lisp/erc/erc-xdcc.el
+++ b/lisp/erc/erc-xdcc.el
@@ -24,7 +24,7 @@
24 24
25;;; Commentary: 25;;; Commentary:
26 26
27;; This file provides a very simple XDCC file server for the Emacs IRC Client. 27;; This file provides a very simple XDCC file server for ERC.
28 28
29;;; Code: 29;;; Code:
30 30
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 936fffa252f..d444ab2af0f 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1719,22 +1719,15 @@ all channel buffers on all servers."
1719(defun erc-migrate-modules (mods) 1719(defun erc-migrate-modules (mods)
1720 "Migrate old names of ERC modules to new ones." 1720 "Migrate old names of ERC modules to new ones."
1721 ;; modify `transforms' to specify what needs to be changed 1721 ;; modify `transforms' to specify what needs to be changed
1722 ;; each item is in the format '(new .old) 1722 ;; each item is in the format '(old . new)
1723 (let ((transforms '((pcomplete . completion))) 1723 (let ((transforms '((pcomplete . completion))))
1724 (modules (copy-alist mods))) 1724 (erc-delete-dups
1725 (dolist (transform transforms) 1725 (mapcar (lambda (m) (or (cdr (assoc m transforms)) m))
1726 (let ((addp nil)) 1726 mods))))
1727 (setq modules (erc-delete-if `(lambda (val) 1727
1728 (and (eq val ',(car transform)) 1728(defcustom erc-modules '(netsplit fill button match track completion readonly
1729 (setq addition t)))
1730 modules))
1731 (when addp
1732 (add-to-list 'modules (cdr transform)))))
1733 (erc-delete-dups modules)))
1734
1735(defcustom erc-modules '(netsplit fill button match track pcomplete readonly
1736 ring autojoin noncommands irccontrols 1729 ring autojoin noncommands irccontrols
1737 stamp) 1730 stamp list)
1738 "A list of modules which erc should enable. 1731 "A list of modules which erc should enable.
1739If you set the value of this without using `customize' remember to call 1732If you set the value of this without using `customize' remember to call
1740\(erc-update-modules) after you change it. When using `customize', modules 1733\(erc-update-modules) after you change it. When using `customize', modules
@@ -1755,40 +1748,42 @@ removed from the list will be disabled."
1755 ;; this test is for the case where erc hasn't been loaded yet 1748 ;; this test is for the case where erc hasn't been loaded yet
1756 (when (fboundp 'erc-update-modules) 1749 (when (fboundp 'erc-update-modules)
1757 (erc-update-modules))) 1750 (erc-update-modules)))
1758 :type '(set :greedy t 1751 :type
1759 (const :tag "Set away status automatically" autoaway) 1752 '(set
1760 (const :tag "Join channels automatically" autojoin) 1753 :greedy t
1761 (const :tag "Integrate with Big Brother Database" bbdb) 1754 (const :tag "Set away status automatically" autoaway)
1762 (const :tag "Buttonize URLs, nicknames, and other text" button) 1755 (const :tag "Join channels automatically" autojoin)
1763 (const :tag "Wrap long lines" fill) 1756 (const :tag "Integrate with Big Brother Database" bbdb)
1764 (const :tag "Highlight or remove IRC control characters" 1757 (const :tag "Buttonize URLs, nicknames, and other text" button)
1765 irccontrols) 1758 (const :tag "Wrap long lines" fill)
1766 (const :tag "Save buffers in logs" log) 1759 (const :tag "Highlight or remove IRC control characters"
1767 (const :tag "Highlight pals, fools, and other keywords" match) 1760 irccontrols)
1768 (const :tag "Detect netsplits" netsplit) 1761 (const :tag "Save buffers in logs" log)
1769 (const :tag "Don't display non-IRC commands after evaluation" 1762 (const :tag "Highlight pals, fools, and other keywords" match)
1770 noncommands) 1763 (const :tag "Detect netsplits" netsplit)
1771 (const :tag 1764 (const :tag "Don't display non-IRC commands after evaluation"
1772 "Notify when the online status of certain users changes" 1765 noncommands)
1773 notify) 1766 (const :tag
1774 (const :tag "Complete nicknames and commands (programmable)" 1767 "Notify when the online status of certain users changes"
1775 completion) 1768 notify)
1776 (const :tag "Complete nicknames and commands (old)" hecomplete) 1769 (const :tag "Complete nicknames and commands (programmable)"
1777 (const :tag "Make displayed lines read-only" readonly) 1770 completion)
1778 (const :tag "Replace text in messages" replace) 1771 (const :tag "Complete nicknames and commands (old)" hecomplete)
1779 (const :tag "Enable an input history" ring) 1772 (const :tag "Make displayed lines read-only" readonly)
1780 (const :tag "Scroll to the bottom of the buffer" scrolltobottom) 1773 (const :tag "Replace text in messages" replace)
1781 (const :tag "Identify to Nickserv (IRC Services) automatically" 1774 (const :tag "Enable an input history" ring)
1782 services) 1775 (const :tag "Scroll to the bottom of the buffer" scrolltobottom)
1783 (const :tag "Convert smileys to pretty icons" smiley) 1776 (const :tag "Identify to Nickserv (IRC Services) automatically"
1784 (const :tag "Play sounds when you receive CTCP SOUND requests" 1777 services)
1785 sound) 1778 (const :tag "Convert smileys to pretty icons" smiley)
1786 (const :tag "Add timestamps to messages" stamp) 1779 (const :tag "Play sounds when you receive CTCP SOUND requests"
1787 (const :tag "Check spelling" spelling) 1780 sound)
1788 (const :tag "Track channel activity in the mode-line" track) 1781 (const :tag "Add timestamps to messages" stamp)
1789 (const :tag "Truncate buffers to a certain size" truncate) 1782 (const :tag "Check spelling" spelling)
1790 (const :tag "Translate morse code in messages" unmorse) 1783 (const :tag "Track channel activity in the mode-line" track)
1791 (repeat :tag "Others" :inline t symbol)) 1784 (const :tag "Truncate buffers to a certain size" truncate)
1785 (const :tag "Translate morse code in messages" unmorse)
1786 (repeat :tag "Others" :inline t symbol))
1792 :group 'erc) 1787 :group 'erc)
1793 1788
1794(defun erc-update-modules () 1789(defun erc-update-modules ()
@@ -1799,14 +1794,11 @@ removed from the list will be disabled."
1799 (cond 1794 (cond
1800 ;; yuck. perhaps we should bring the filenames into sync? 1795 ;; yuck. perhaps we should bring the filenames into sync?
1801 ((string= req "erc-completion") 1796 ((string= req "erc-completion")
1802 (setq req "erc-pcomplete") 1797 (setq req "erc-pcomplete"))
1803 (setq mod 'completion))
1804 ((string= req "erc-pcomplete") 1798 ((string= req "erc-pcomplete")
1805 (setq req "erc-pcomplete")
1806 (setq mod 'completion)) 1799 (setq mod 'completion))
1807 ((string= req "erc-autojoin") 1800 ((string= req "erc-autojoin")
1808 (setq req "erc-join") 1801 (setq req "erc-join")))
1809 (setq mod 'autojoin)))
1810 (condition-case nil 1802 (condition-case nil
1811 (require (intern req)) 1803 (require (intern req))
1812 (error nil)) 1804 (error nil))
@@ -6143,6 +6135,26 @@ This function should be on `erc-kill-channel-hook'."
6143 (funcall erc-part-reason nil)) 6135 (funcall erc-part-reason nil))
6144 nil tgt)))) 6136 nil tgt))))
6145 6137
6138;;; Dealing with `erc-parsed'
6139
6140(defun erc-get-parsed-vector (point)
6141 "Return the whole parsed vector on POINT."
6142 (get-text-property point 'erc-parsed))
6143
6144(defun erc-get-parsed-vector-nick (vect)
6145 "Return nickname in the parsed vector VECT."
6146 (let* ((untreated-nick (and vect (erc-response.sender vect)))
6147 (maybe-nick (when untreated-nick
6148 (car (split-string untreated-nick "!")))))
6149 (when (and (not (null maybe-nick))
6150 (erc-is-valid-nick-p maybe-nick))
6151 untreated-nick)))
6152
6153(defun erc-get-parsed-vector-type (vect)
6154 "Return message type in the parsed vector VECT."
6155 (and vect
6156 (erc-response.command vect)))
6157
6146(provide 'erc) 6158(provide 'erc)
6147 6159
6148;;; Deprecated. We might eventually stop requiring the goodies automatically. 6160;;; Deprecated. We might eventually stop requiring the goodies automatically.