;; This looks like an error, but we have to keep reading the output
;; to see if it was fixed or not. E.g. it may indicate that IPv6
;; failed, but maybe a subsequent IPv4 fallback succeeded.
- (set (make-local-variable 'ange-ftp-pending-error-line) line)
+ (setq-local ange-ftp-pending-error-line line)
t)
((string-match ange-ftp-fatal-msgs line)
(delete-process proc)
"Major mode for interacting with the FTP process.
\\{comint-mode-map}"
- (make-local-variable 'ange-ftp-process-string)
- (setq ange-ftp-process-string "")
+ (setq-local ange-ftp-process-string "")
(make-local-variable 'ange-ftp-process-busy)
(make-local-variable 'ange-ftp-process-result)
(make-local-variable 'ange-ftp-process-msg)
(make-local-variable 'ange-ftp-process-multi-skip)
- (make-local-variable 'ange-ftp-process-result-line)
(make-local-variable 'ange-ftp-process-continue)
- (make-local-variable 'ange-ftp-hash-mark-count)
(make-local-variable 'ange-ftp-binary-hash-mark-size)
(make-local-variable 'ange-ftp-ascii-hash-mark-size)
(make-local-variable 'ange-ftp-hash-mark-unit)
- (make-local-variable 'ange-ftp-xfer-size)
(make-local-variable 'ange-ftp-last-percent)
- (setq ange-ftp-hash-mark-count 0)
- (setq ange-ftp-xfer-size 0)
- (setq ange-ftp-process-result-line "")
+ (setq-local ange-ftp-hash-mark-count 0)
+ (setq-local ange-ftp-xfer-size 0)
+ (setq-local ange-ftp-process-result-line "")
(setq comint-prompt-regexp "^ftp> ")
- (make-local-variable 'comint-password-prompt-regexp)
;; This is a regexp that can't match anything.
;; ange-ftp has its own ways of handling passwords.
- (setq comint-password-prompt-regexp regexp-unmatchable)
- (make-local-variable 'paragraph-start)
- (setq paragraph-start comint-prompt-regexp))
+ (setq-local comint-password-prompt-regexp regexp-unmatchable)
+ (setq-local paragraph-start comint-prompt-regexp))
(defcustom ange-ftp-raw-login nil
"Use raw FTP commands for login, if account password is not nil.
;; (set-process-sentinel proc 'ange-ftp-copy-file-locally-sentinel)
;; (set-process-query-on-exit-flag proc nil)
;; (with-current-buffer (process-buffer proc)
-;; (set (make-local-variable 'copy-cont) cont))))
+;; (setq-local copy-cont cont))))
;;
;; (defun ange-ftp-copy-file-locally-sentinel (proc status)
;; (with-current-buffer (process-buffer proc)
(string-match "The specified message set is invalid"
(cadr data)))
(with-current-buffer (or buffer (current-buffer))
- (set (make-local-variable 'imap-enable-exchange-bug-workaround)
- t)
+ (setq-local imap-enable-exchange-bug-workaround t)
(imap-fetch (cdr uids) props receive nouidfetch))
(signal (car data) (cdr data))))))
(define-derived-mode net-utils-mode special-mode "NetworkUtil"
"Major mode for interacting with an external network utility."
- (set (make-local-variable 'font-lock-defaults)
- '((net-utils-font-lock-keywords)))
+ (setq-local font-lock-defaults
+ '((net-utils-font-lock-keywords)))
(setq-local revert-buffer-function #'net-utils--revert-function))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Using a derived mode gives us keymaps, hooks, etc.
(define-derived-mode nslookup-mode comint-mode "Nslookup"
"Major mode for interacting with the nslookup program."
- (set
- (make-local-variable 'font-lock-defaults)
- '((nslookup-font-lock-keywords)))
+ (setq-local font-lock-defaults
+ '((nslookup-font-lock-keywords)))
(setq comint-prompt-regexp nslookup-prompt-regexp)
(setq comint-input-autoexpand t))
"Major mode for interacting with the network-connection program.")
(defun network-connection-mode-setup (host service)
- (make-local-variable 'network-connection-host)
- (setq network-connection-host host)
- (make-local-variable 'network-connection-service)
- (setq network-connection-service service))
+ (setq-local network-connection-host host)
+ (setq-local network-connection-service service))
;;;###autoload
(defun network-connection-to-service (host service)
"NewsTicker"
"Viewing news feeds in Emacs."
(if (boundp 'tool-bar-map)
- (set (make-local-variable 'tool-bar-map)
- newsticker--plainview-tool-bar-map))
- (set (make-local-variable 'imenu-sort-function) nil)
- (set (make-local-variable 'scroll-conservatively) 999)
+ (setq-local tool-bar-map
+ newsticker--plainview-tool-bar-map))
+ (setq-local imenu-sort-function nil)
+ (setq-local scroll-conservatively 999)
(setq imenu-create-index-function 'newsticker--imenu-create-index)
(setq imenu-default-goto-function 'newsticker--imenu-goto)
(setq buffer-read-only t)
(auto-fill-mode -1) ;; turn auto-fill off!
(font-lock-mode -1) ;; turn off font-lock!!
- (set (make-local-variable 'font-lock-defaults) nil)
- (set (make-local-variable 'line-move-ignore-invisible) t)
+ (setq-local font-lock-defaults nil)
+ (setq-local line-move-ignore-invisible t)
(setq mode-line-format
(list "-"
'mode-line-mule-info
(set-buffer-file-coding-system 'utf-8)
(if newsticker-use-full-width
- (set (make-local-variable 'fill-column) (1- (window-width))))
+ (setq-local fill-column (1- (window-width))))
(newsticker--buffer-insert-all-items)
;; FIXME: needed for methods buffer in ecb
(window-width (newsticker--treeview-item-window))
fill-column))))
(if newsticker-use-full-width
- (set (make-local-variable 'fill-column) wwidth))
- (set (make-local-variable 'fill-column) (min fill-column
- wwidth)))
+ (setq-local fill-column wwidth))
+ (setq-local fill-column (min fill-column wwidth)))
(let ((desc (newsticker--desc item)))
(insert "\n" (or desc "[No Description]")))
(set-marker marker1 (1+ (point-min)))
"Major mode for Newsticker Treeview.
\\{newsticker-treeview-mode-map}"
(if (boundp 'tool-bar-map)
- (set (make-local-variable 'tool-bar-map)
- newsticker-treeview-tool-bar-map))
+ (setq-local tool-bar-map
+ newsticker-treeview-tool-bar-map))
(setq buffer-read-only t
truncate-lines t))
(unless (comint-check-proc buffer-name)
(comint-exec buffer buffer-name rlogin-program nil args)
(rlogin-mode)
- (make-local-variable 'rlogin-host)
- (setq rlogin-host host)
- (make-local-variable 'rlogin-remote-user)
- (setq rlogin-remote-user user)
+ (setq-local rlogin-host host)
+ (setq-local rlogin-remote-user user)
(ignore-errors
(cond ((eq rlogin-directory-tracking-mode t)
;; Do this here, rather than calling the tracking mode
\\{secrets-mode-map}"
(setq buffer-undo-list t)
- (set (make-local-variable 'revert-buffer-function)
- #'secrets-show-collections)
+ (setq-local revert-buffer-function
+ #'secrets-show-collections)
;; When we toggle, we must set temporary widgets.
(add-hook 'tree-widget-after-toggle-functions
#'secrets-tree-widget-after-toggle-function nil t))
indentation. It has its own abbrev table and its own syntax table.
Turning on Sieve mode runs `sieve-mode-hook'."
- (set (make-local-variable 'paragraph-start) (concat "$\\|" page-delimiter))
- (set (make-local-variable 'paragraph-separate) paragraph-start)
- (set (make-local-variable 'comment-start) "#")
- (set (make-local-variable 'comment-end) "")
- ;;(set (make-local-variable 'comment-start-skip) "\\(^\\|\\s-\\);?#+ *")
- (set (make-local-variable 'comment-start-skip) "#+ *")
- (set (make-local-variable 'syntax-propertize-function)
- #'sieve-syntax-propertize)
- (set (make-local-variable 'font-lock-defaults)
- '(sieve-font-lock-keywords nil nil ((?_ . "w"))))
+ (setq-local paragraph-start (concat "$\\|" page-delimiter))
+ (setq-local paragraph-separate paragraph-start)
+ (setq-local comment-start "#")
+ (setq-local comment-end "")
+ ;; (setq-local comment-start-skip "\\(^\\|\\s-\\);?#+ *")
+ (setq-local comment-start-skip "#+ *")
+ (setq-local syntax-propertize-function #'sieve-syntax-propertize)
+ (setq-local font-lock-defaults
+ '(sieve-font-lock-keywords nil nil ((?_ . "w"))))
(easy-menu-add-item nil nil sieve-mode-menu))
(provide 'sieve-mode)
(let* ((port (or port sieve-manage-default-port))
(header (format "Server : %s:%s\n\n" server port)))
(insert header))
- (set (make-local-variable 'sieve-buffer-header-end)
- (point-max)))
+ (setq-local sieve-buffer-header-end (point-max)))
(defun sieve-script-at-point (&optional pos)
"Return name of sieve script at point POS, or nil."
"Open SERVER (on PORT) and authenticate."
(with-current-buffer
(or ;; open server
- (set (make-local-variable 'sieve-manage-buffer)
- (sieve-manage-open server port))
+ (setq-local sieve-manage-buffer
+ (sieve-manage-open server port))
(error "Error opening server %s" server))
(sieve-manage-authenticate)))
(setq local-abbrev-table abbrev)
;; Set up paragraphs (?)
- (make-local-variable 'paragraph-start)
- (setq paragraph-start (concat "$\\|" page-delimiter))
- (make-local-variable 'paragraph-separate)
- (setq paragraph-separate paragraph-start)
- (make-local-variable 'paragraph-ignore-fill-prefix)
- (setq paragraph-ignore-fill-prefix t)
+ (setq-local paragraph-start (concat "$\\|" page-delimiter))
+ (setq-local paragraph-separate paragraph-start)
+ (setq-local paragraph-ignore-fill-prefix t)
;; Set up comments
- (make-local-variable 'comment-start)
- (setq comment-start "-- ")
- (make-local-variable 'comment-start-skip)
- (setq comment-start-skip "--+[ \t]*")
- (make-local-variable 'comment-column)
- (setq comment-column 40)
- (make-local-variable 'parse-sexp-ignore-comments)
- (setq parse-sexp-ignore-comments t)
+ (setq-local comment-start "-- ")
+ (setq-local comment-start-skip "--+[ \t]*")
+ (setq-local comment-column 40)
+ (setq-local parse-sexp-ignore-comments t)
;; Set up indentation
(if snmp-special-indent
- (set (make-local-variable 'indent-line-function) 'snmp-indent-line))
- (set (make-local-variable 'tab-always-indent) snmp-tab-always-indent)
+ (setq-local indent-line-function 'snmp-indent-line))
+ (setq-local tab-always-indent snmp-tab-always-indent)
;; Font Lock
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults (cons font-keywords '(nil nil ((?- . "w 1234")))))
+ (setq-local font-lock-defaults (cons font-keywords '(nil nil ((?- . "w 1234")))))
;; Imenu
- (make-local-variable 'imenu-create-index-function)
- (setq imenu-create-index-function imenu-index)
+ (setq-local imenu-create-index-function imenu-index)
;; Tempo
(tempo-use-tag-list tempo-tags)
- (make-local-variable 'tempo-match-finder)
- (setq tempo-match-finder "\\b\\(.+\\)\\=")
- (make-local-variable 'tempo-interactive)
- (setq tempo-interactive t)
+ (setq-local tempo-match-finder "\\b\\(.+\\)\\=")
+ (setq-local tempo-interactive t)
;; Miscellaneous customization
- (make-local-variable 'require-final-newline)
- (setq require-final-newline mode-require-final-newline))
+ (setq-local require-final-newline mode-require-final-newline))
;; SNMPv1 MIB Editing Mode.
'snmp-tempo-tags)
;; Completion lists
- (make-local-variable 'snmp-mode-syntax-list)
- (setq snmp-mode-syntax-list (append snmp-rfc1155-types
- snmp-rfc1213-types
- snmp-mode-syntax-list))
- (make-local-variable 'snmp-mode-access-list)
- (setq snmp-mode-access-list snmp-rfc1155-access)
- (make-local-variable 'snmp-mode-status-list)
- (setq snmp-mode-status-list snmp-rfc1212-status)
+ (setq-local snmp-mode-syntax-list (append snmp-rfc1155-types
+ snmp-rfc1213-types
+ snmp-mode-syntax-list))
+ (setq-local snmp-mode-access-list snmp-rfc1155-access)
+ (setq-local snmp-mode-status-list snmp-rfc1212-status)
;; Run hooks
(run-mode-hooks 'snmp-common-mode-hook 'snmp-mode-hook))
'snmpv2-tempo-tags)
;; Completion lists
- (make-local-variable 'snmp-mode-syntax-list)
- (setq snmp-mode-syntax-list (append snmp-rfc1902-types
- snmp-rfc1903-types
- snmp-mode-syntax-list))
- (make-local-variable 'snmp-mode-access-list)
- (setq snmp-mode-access-list snmp-rfc1902-access)
- (make-local-variable 'snmp-mode-status-list)
- (setq snmp-mode-status-list snmp-rfc1902-status)
+ (setq-local snmp-mode-syntax-list (append snmp-rfc1902-types
+ snmp-rfc1903-types
+ snmp-mode-syntax-list))
+ (setq-local snmp-mode-access-list snmp-rfc1902-access)
+ (setq-local snmp-mode-status-list snmp-rfc1902-status)
;; Run hooks
(run-mode-hooks 'snmp-common-mode-hook 'snmpv2-mode-hook))
sent to try to stop execution of a job on the remote host.
Data is sent to the remote host when RET is typed."
(setq-local revert-buffer-function 'telnet-revert-buffer)
- (set (make-local-variable 'window-point-insertion-type) t)
- (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern)
- (set (make-local-variable 'comint-use-prompt-regexp) t))
+ (setq-local window-point-insertion-type t)
+ (setq-local comint-prompt-regexp telnet-prompt-pattern)
+ (setq-local comint-use-prompt-regexp t))
;;;###autoload
(defun rsh (host)
;; in the traces.
(let ((default-directory (tramp-compat-temporary-file-directory)))
(outline-mode))
- (set (make-local-variable 'outline-level) 'tramp-debug-outline-level)
- (set (make-local-variable 'font-lock-keywords)
- `(t (eval ,tramp-debug-font-lock-keywords)
- ,(eval tramp-debug-font-lock-keywords)))
+ (setq-local outline-level 'tramp-debug-outline-level)
+ (setq-local font-lock-keywords
+ `(t (eval ,tramp-debug-font-lock-keywords)
+ ,(eval tramp-debug-font-lock-keywords)))
;; Do not edit the debug buffer.
(use-local-map special-mode-map))
(current-buffer)))