(defun erc-imenu-setup ()
"Setup Imenu support in an ERC buffer."
- (set (make-local-variable 'imenu-create-index-function)
- 'erc-create-imenu-index))
+ (setq-local imenu-create-index-function #'erc-create-imenu-index))
(add-hook 'erc-mode-hook 'erc-imenu-setup)
(autoload 'erc-create-imenu-index "erc-imenu" "Imenu index creation function")
(lambda (_proc _parsed)
(remove-hook 'erc-server-322-functions 'erc-list-handle-322 t)))
;; Find the list buffer, empty it, and display it.
- (set (make-local-variable 'erc-list-buffer)
- (get-buffer-create (concat "*Channels of "
- erc-server-announced-name
- "*")))
+ (setq-local erc-list-buffer
+ (get-buffer-create (concat "*Channels of "
+ erc-server-announced-name
+ "*")))
(with-current-buffer erc-list-buffer
(erc-list-menu-mode)
(setq buffer-read-only nil)
(erase-buffer)
- (set (make-local-variable 'erc-list-server-buffer) server-buffer)
+ (setq-local erc-list-server-buffer server-buffer)
(setq buffer-read-only t))
(pop-to-buffer erc-list-buffer))
t)
Please note that this function only works with IRC servers which conform
to RFC and send the LIST header (#321) at start of list transmission."
(erc-with-server-buffer
- (set (make-local-variable 'erc-list-last-argument) line)
+ (setq-local erc-list-last-argument line)
(erc-once-with-server-event
321
(let ((buf (current-buffer)))
(defun pcomplete-erc-setup ()
"Setup `erc-mode' to use pcomplete."
- (set (make-local-variable 'pcomplete-ignore-case)
- t)
- (set (make-local-variable 'pcomplete-use-paring)
- nil)
- (set (make-local-variable 'pcomplete-parse-arguments-function)
- 'pcomplete-erc-parse-arguments)
- (set (make-local-variable 'pcomplete-command-completion-function)
- 'pcomplete/erc-mode/complete-command)
- (set (make-local-variable 'pcomplete-command-name-function)
- 'pcomplete-erc-command-name)
- (set (make-local-variable 'pcomplete-default-completion-function)
- (lambda () (pcomplete-here (pcomplete-erc-nicks)))))
+ (setq-local pcomplete-ignore-case t)
+ (setq-local pcomplete-use-paring nil)
+ (setq-local pcomplete-parse-arguments-function
+ #'pcomplete-erc-parse-arguments)
+ (setq-local pcomplete-command-completion-function
+ #'pcomplete/erc-mode/complete-command)
+ (setq-local pcomplete-command-name-function
+ #'pcomplete-erc-command-name)
+ (setq-local pcomplete-default-completion-function
+ (lambda () (pcomplete-here (pcomplete-erc-nicks)))))
;;; Programmable completion logic
(define-derived-mode erc-mode fundamental-mode "ERC"
"Major mode for Emacs IRC."
(setq local-abbrev-table erc-mode-abbrev-table)
- (set (make-local-variable 'next-line-add-newlines) nil)
+ (setq-local 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)) "\\)"))
+ (setq-local paragraph-separate
+ (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)"))
+ (setq-local paragraph-start
+ (concat "\\(" (regexp-quote (erc-prompt)) "\\)"))
(setq-local completion-ignore-case t)
(add-hook 'completion-at-point-functions 'erc-complete-word-at-point nil t))
(format-spec erc-header-line-format spec)
nil)))
(cond (erc-header-line-uses-tabbar-p
- (set (make-local-variable 'tabbar--local-hlf)
- header-line-format)
+ (setq-local tabbar--local-hlf header-line-format)
(kill-local-variable 'header-line-format))
((null header)
(setq header-line-format nil))