aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeniz Dogan2011-01-31 21:44:45 +0100
committerDeniz Dogan2011-01-31 21:44:45 +0100
commit2a4466ca2001c29fd654420b081b780981333dc5 (patch)
treef687938f8f876240dff91d3643c2b8b93c45ea45
parentd95f875e4c1fc2417e7cf4e6bdb5efa90ccb30fa (diff)
downloademacs-2a4466ca2001c29fd654420b081b780981333dc5.tar.gz
emacs-2a4466ca2001c29fd654420b081b780981333dc5.zip
* lisp/net/rcirc.el: New customizable nick completion format.
(rcirc-nick-completion-format): New defcustom. (rcirc-complete): Use it.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/rcirc.el19
2 files changed, 20 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 584bf71c744..00460741961 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -17,6 +17,12 @@
17 17
182011-01-31 Deniz Dogan <deniz.a.m.dogan@gmail.com> 182011-01-31 Deniz Dogan <deniz.a.m.dogan@gmail.com>
19 19
20 * net/rcirc.el: New customizable nick completion format.
21 (rcirc-nick-completion-format): New defcustom.
22 (rcirc-complete): Use it.
23
242011-01-31 Deniz Dogan <deniz.a.m.dogan@gmail.com>
25
20 * net/rcirc.el: Clean log filenames (Bug#7933). 26 * net/rcirc.el: Clean log filenames (Bug#7933).
21 (rcirc-log-write): Use convert-standard-filename. 27 (rcirc-log-write): Use convert-standard-filename.
22 (rcirc-log-filename-function): Documentation updates. 28 (rcirc-log-filename-function): Documentation updates.
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 59a7b176088..678aba598b7 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -322,6 +322,15 @@ and the cdr part is used for encoding."
322 :type 'function 322 :type 'function
323 :group 'rcirc) 323 :group 'rcirc)
324 324
325(defcustom rcirc-nick-completion-format "%s: "
326 "Format string to use in nick completions.
327
328The format string is only used when completing at the beginning
329of a line. The string is passed as the first argument to
330`format' with the nickname as the second argument."
331 :type 'string
332 :group 'rcirc)
333
325(defvar rcirc-nick nil) 334(defvar rcirc-nick nil)
326 335
327(defvar rcirc-prompt-start-marker nil) 336(defvar rcirc-prompt-start-marker nil)
@@ -827,11 +836,11 @@ IRC command completion is performed only if '/' is the first input char."
827 (when completion 836 (when completion
828 (delete-region rcirc-completion-start (point)) 837 (delete-region rcirc-completion-start (point))
829 (insert 838 (insert
830 (concat completion 839 (cond
831 (cond 840 ((= (aref completion 0) ?/) (concat completion " "))
832 ((= (aref completion 0) ?/) " ") 841 ((= rcirc-completion-start rcirc-prompt-end-marker)
833 ((= rcirc-completion-start rcirc-prompt-end-marker) ": ") 842 (format rcirc-nick-completion-format completion))
834 (t ""))))))) 843 (t completion))))))
835 844
836(defun set-rcirc-decode-coding-system (coding-system) 845(defun set-rcirc-decode-coding-system (coding-system)
837 "Set the decode coding system used in this channel." 846 "Set the decode coding system used in this channel."