From 781d997fceb0e7d7687fcd9a756e151a8471442b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 6 Mar 2018 20:16:52 -0500 Subject: [PATCH] Replace some obsolete aliases in code * lisp/emulation/viper.el (viper-set-hooks): * lisp/epa-hook.el (auto-encryption-mode): * lisp/term/pc-win.el (set-frame-font): Replace obsolete aliases. * lisp/net/quickurl.el (quickurl--assoc-function): New. (quickurl-assoc-function): Use it. --- lisp/emulation/viper.el | 2 +- lisp/epa-hook.el | 2 +- lisp/net/quickurl.el | 7 ++++++- lisp/term/pc-win.el | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 13a88ad11fa..c8eca30e88b 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -902,7 +902,7 @@ Two differences: (viper-setup-ESC-to-escape t) (add-hook 'change-major-mode-hook #'viper-major-mode-change-sentinel) - (add-hook 'find-file-hooks #'set-viper-state-in-major-mode) + (add-hook 'find-file-hook #'set-viper-state-in-major-mode) ;; keep this because many modes we don't know about use this hook (defvar text-mode-hook) diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index d99a3ef51a9..135c956c3f4 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -95,7 +95,7 @@ the mode if ARG is omitted or nil." :initialize 'custom-initialize-delay (setq file-name-handler-alist (delq epa-file-handler file-name-handler-alist)) - (remove-hook 'find-file-hooks 'epa-file-find-file-hook) + (remove-hook 'find-file-hook 'epa-file-find-file-hook) (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry auto-mode-alist)) (when auto-encryption-mode diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 5321807cd6c..abfca383e09 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -116,8 +116,13 @@ :type 'function :group 'quickurl) -(defcustom quickurl-assoc-function #'assoc-ignore-case +(defun quickurl--assoc-function (key alist) + "Default function for `quickurl-assoc-function'." + (assoc-string key alist t)) + +(defcustom quickurl-assoc-function #'quickurl--assoc-function "Function to use for alist lookup into `quickurl-urls'." + :version "26.1" ; was the obsolete assoc-ignore-case :type 'function :group 'quickurl) diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 9c1b471d484..e0e412e1626 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -272,7 +272,7 @@ Consult the selection. Treat empty strings as if they were unset." (fset 'iconify-or-deiconify-frame 'ignore) ;; From lisp/frame.el -(fset 'set-default-font 'ignore) +(fset 'set-frame-font 'ignore) (fset 'set-mouse-color 'ignore) ; We cannot, I think. (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. (fset 'set-border-color 'ignore) ; Not useful. -- 2.39.2