diff options
| author | Deniz Dogan | 2011-01-31 21:44:45 +0100 |
|---|---|---|
| committer | Deniz Dogan | 2011-01-31 21:44:45 +0100 |
| commit | 2a4466ca2001c29fd654420b081b780981333dc5 (patch) | |
| tree | f687938f8f876240dff91d3643c2b8b93c45ea45 | |
| parent | d95f875e4c1fc2417e7cf4e6bdb5efa90ccb30fa (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 19 |
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 | ||
| 18 | 2011-01-31 Deniz Dogan <deniz.a.m.dogan@gmail.com> | 18 | 2011-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 | |||
| 24 | 2011-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 | |||
| 328 | The format string is only used when completing at the beginning | ||
| 329 | of 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." |