[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103058: * lisp/net/rcirc.el: New cus
From: |
Deniz Dogan |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103058: * lisp/net/rcirc.el: New customizable nick completion format. |
Date: |
Mon, 31 Jan 2011 21:44:45 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103058
committer: Deniz Dogan <address@hidden>
branch nick: emacs-trunk
timestamp: Mon 2011-01-31 21:44:45 +0100
message:
* lisp/net/rcirc.el: New customizable nick completion format.
(rcirc-nick-completion-format): New defcustom.
(rcirc-complete): Use it.
modified:
lisp/ChangeLog
lisp/net/rcirc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-01-31 17:09:42 +0000
+++ b/lisp/ChangeLog 2011-01-31 20:44:45 +0000
@@ -17,6 +17,12 @@
2011-01-31 Deniz Dogan <address@hidden>
+ * net/rcirc.el: New customizable nick completion format.
+ (rcirc-nick-completion-format): New defcustom.
+ (rcirc-complete): Use it.
+
+2011-01-31 Deniz Dogan <address@hidden>
+
* net/rcirc.el: Clean log filenames (Bug#7933).
(rcirc-log-write): Use convert-standard-filename.
(rcirc-log-filename-function): Documentation updates.
=== modified file 'lisp/net/rcirc.el'
--- a/lisp/net/rcirc.el 2011-01-31 15:19:57 +0000
+++ b/lisp/net/rcirc.el 2011-01-31 20:44:45 +0000
@@ -322,6 +322,15 @@
:type 'function
:group 'rcirc)
+(defcustom rcirc-nick-completion-format "%s: "
+ "Format string to use in nick completions.
+
+The format string is only used when completing at the beginning
+of a line. The string is passed as the first argument to
+`format' with the nickname as the second argument."
+ :type 'string
+ :group 'rcirc)
+
(defvar rcirc-nick nil)
(defvar rcirc-prompt-start-marker nil)
@@ -827,11 +836,11 @@
(when completion
(delete-region rcirc-completion-start (point))
(insert
- (concat completion
- (cond
- ((= (aref completion 0) ?/) " ")
- ((= rcirc-completion-start rcirc-prompt-end-marker) ": ")
- (t "")))))))
+ (cond
+ ((= (aref completion 0) ?/) (concat completion " "))
+ ((= rcirc-completion-start rcirc-prompt-end-marker)
+ (format rcirc-nick-completion-format completion))
+ (t completion))))))
(defun set-rcirc-decode-coding-system (coding-system)
"Set the decode coding system used in this channel."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103058: * lisp/net/rcirc.el: New customizable nick completion format.,
Deniz Dogan <=