diff options
Diffstat (limited to 'lisp/erc')
-rw-r--r-- | lisp/erc/ChangeLog | 19 | ||||
-rw-r--r-- | lisp/erc/erc-dcc.el | 12 | ||||
-rw-r--r-- | lisp/erc/erc.el | 22 |
3 files changed, 20 insertions, 33 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 210f6985dc9..26e8c9aee28 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,8 @@ +2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * erc.el (erc-mode): + * erc-dcc.el (erc-dcc-chat-mode): Use define-derived-mode. + 2010-11-11 Glenn Morris <rgm@gnu.org> * erc-lang.el (erc-cmd-LANG): Fix what may have been a typo. @@ -25,17 +30,17 @@ 2010-08-14 Vivek Dasmohapatra <vivek@etla.org> * erc-join.el (erc-autojoin-timing, erc-autojoin-delay): New vars. - (erc-autojoin-channels-delayed, erc-autojoin-after-ident): New - functions. + (erc-autojoin-channels-delayed, erc-autojoin-after-ident): + New functions. (erc-autojoin-channels): Allow autojoining after ident (Bug#5521). 2010-08-08 Fran Litterio <flitterio@gmail.com> - * erc-backend.el (erc-server-filter-function): Call - erc-log-irc-protocol. + * erc-backend.el (erc-server-filter-function): + Call erc-log-irc-protocol. - * erc.el (erc-toggle-debug-irc-protocol): Bind - erc-toggle-debug-irc-protocol to t. + * erc.el (erc-toggle-debug-irc-protocol): + Bind erc-toggle-debug-irc-protocol to t. 2010-05-07 Chong Yidong <cyd@stupidchicken.com> @@ -126,7 +131,7 @@ See ChangeLog.08 for earlier changes. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 2da4c83b7cb..5578e52791d 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -1,7 +1,7 @@ ;;; erc-dcc.el --- CTCP DCC module for ERC ;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2008, 2009, 2010, 2011 Free Software Foundation, Inc. ;; Author: Ben A. Mesander <ben@gnu.ai.mit.edu> ;; Noah Friedman <friedman@prep.ai.mit.edu> @@ -1098,17 +1098,11 @@ Possible values are: ask, auto, ignore." map) "Keymap for `erc-dcc-mode'.") -(defun erc-dcc-chat-mode () +(define-derived-mode erc-dcc-chat-mode fundamental-mode "DCC-Chat" "Major mode for wasting time via DCC chat." - (interactive) - (kill-all-local-variables) (setq mode-line-process '(":%s") - mode-name "DCC-Chat" - major-mode 'erc-dcc-chat-mode erc-send-input-line-function 'erc-dcc-chat-send-input-line - erc-default-recipients '(dcc)) - (use-local-map erc-dcc-chat-mode-map) - (run-hooks 'erc-dcc-chat-mode-hook)) + erc-default-recipients '(dcc))) (defun erc-dcc-chat-send-input-line (recipient line &optional force) "Send LINE to the remote end. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 54f87982f8f..ab3f12a59b6 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1,7 +1,7 @@ ;; erc.el --- An Emacs Internet Relay Chat client ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. ;; Author: Alexander L. Belikoff (alexander@belikoff.net) ;; Contributors: Sergey Berezin (sergey.berezin@cs.cmu.edu), @@ -1439,28 +1439,16 @@ Defaults to the server buffer." ;; Mode activation routines -(defun erc-mode () - "Major mode for Emacs IRC. -Special commands: - -\\{erc-mode-map} - -Turning on `erc-mode' runs the hook `erc-mode-hook'." - (kill-all-local-variables) - (use-local-map erc-mode-map) - (setq mode-name "ERC" - major-mode 'erc-mode - local-abbrev-table erc-mode-abbrev-table) - (set-syntax-table erc-mode-syntax-table) +(define-derived-mode erc-mode fundamental-mode "ERC" + "Major mode for Emacs IRC." + (setq local-abbrev-table erc-mode-abbrev-table) (when (boundp 'next-line-add-newlines) (set (make-local-variable 'next-line-add-newlines) nil)) (setq line-move-ignore-invisible t) (set (make-local-variable 'paragraph-separate) (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)")) (set (make-local-variable 'paragraph-start) - (concat "\\(" (regexp-quote (erc-prompt)) "\\)")) - ;; Run the mode hooks - (run-hooks 'erc-mode-hook)) + (concat "\\(" (regexp-quote (erc-prompt)) "\\)"))) ;; activation |