aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-06 14:13:57 +1100
committerLars Ingebrigtsen2016-02-06 14:14:21 +1100
commit5428b5b24c18ea14916a38c9462df79936dea62b (patch)
tree234ff17a6939dc25f1a6af2fae8b28c9f4d97c22
parent1fbcc8ad08cf94653f0e28b1e83c45f21c0f3ece (diff)
downloademacs-5428b5b24c18ea14916a38c9462df79936dea62b.tar.gz
emacs-5428b5b24c18ea14916a38c9462df79936dea62b.zip
Use completion-ignore-case instead of defining command
* lisp/erc/erc.el (erc-mode): Set completion-ignore-case so that we get case-insensitive completion. (erc-completion-at-point): Remove.
-rw-r--r--lisp/erc/erc.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 295c2c055e2..1a126a80343 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1141,7 +1141,7 @@ which the local user typed."
1141 (define-key map "\C-c\C-u" 'erc-kill-input) 1141 (define-key map "\C-c\C-u" 'erc-kill-input)
1142 (define-key map "\C-c\C-x" 'erc-quit-server) 1142 (define-key map "\C-c\C-x" 'erc-quit-server)
1143 (define-key map "\M-\t" 'ispell-complete-word) 1143 (define-key map "\M-\t" 'ispell-complete-word)
1144 (define-key map "\t" 'erc-completion-at-point) 1144 (define-key map "\t" 'completion-at-point)
1145 1145
1146 ;; Suppress `font-lock-fontify-block' key binding since it 1146 ;; Suppress `font-lock-fontify-block' key binding since it
1147 ;; destroys face properties. 1147 ;; destroys face properties.
@@ -1463,6 +1463,7 @@ Defaults to the server buffer."
1463 (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)")) 1463 (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)"))
1464 (set (make-local-variable 'paragraph-start) 1464 (set (make-local-variable 'paragraph-start)
1465 (concat "\\(" (regexp-quote (erc-prompt)) "\\)")) 1465 (concat "\\(" (regexp-quote (erc-prompt)) "\\)"))
1466 (setq-local completion-ignore-case t)
1466 (add-hook 'completion-at-point-functions 'erc-complete-word-at-point nil t)) 1467 (add-hook 'completion-at-point-functions 'erc-complete-word-at-point nil t))
1467 1468
1468;; activation 1469;; activation
@@ -3991,13 +3992,6 @@ Prompt for one if called interactively."
3991 (format "MODE %s +k %s" tgt key) 3992 (format "MODE %s +k %s" tgt key)
3992 (format "MODE %s -k" tgt))))) 3993 (format "MODE %s -k" tgt)))))
3993 3994
3994(defun erc-completion-at-point ()
3995 "Perform completion on the text around point case-insensitively.
3996See `completion-at-point'."
3997 (interactive)
3998 (let ((completion-ignore-case t))
3999 (completion-at-point)))
4000
4001(defun erc-quit-server (reason) 3995(defun erc-quit-server (reason)
4002 "Disconnect from current server after prompting for REASON. 3996 "Disconnect from current server after prompting for REASON.
4003`erc-quit-reason' works with this just like with `erc-cmd-QUIT'." 3997`erc-quit-reason' works with this just like with `erc-cmd-QUIT'."