From 8fdca7c7c23eaa83aa470276d19a40d1be3a28a4 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sun, 4 Dec 2016 13:52:04 +0000 Subject: [PATCH 05/21] Remove tests for built-in functions * lisp/textmodes/ispell.el (buffer-substring-no-properties): Remove back-up definition. (ispell-command-loop): Remove test for flyspell-unhighlight-at. (ispell-add-per-file-word-list): Remove tests for comment-padright and comment-normalize-vars. --- lisp/textmodes/ispell.el | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 554905c..85661e7 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -132,10 +132,6 @@ ispell "User variables for Emacs ispell interface." :group 'applications) -(if (not (fboundp 'buffer-substring-no-properties)) - (defun buffer-substring-no-properties (start end) - (buffer-substring start end))) - (defalias 'check-ispell-version 'ispell-check-version) ;;; ********************************************************************** @@ -2300,15 +2296,13 @@ ispell-command-loop ((= char ?i) ; accept and insert word into pers dict (ispell-send-string (concat "*" word "\n")) (setq ispell-pdict-modified-p '(t)) ; dictionary modified! - (and (fboundp 'flyspell-unhighlight-at) - (flyspell-unhighlight-at start)) + (flyspell-unhighlight-at start) nil) ((or (= char ?a) (= char ?A)) ; accept word without insert (ispell-send-string (concat "@" word "\n")) (cl-pushnew word ispell-buffer-session-localwords :test #'equal) - (and (fboundp 'flyspell-unhighlight-at) - (flyspell-unhighlight-at start)) + (flyspell-unhighlight-at start) (or ispell-buffer-local-name ; session localwords might conflict (setq ispell-buffer-local-name (buffer-name))) (if (null ispell-pdict-modified-p) @@ -4286,16 +4280,12 @@ ispell-add-per-file-word-list (unless found (newline)) (insert (if comment-start (concat - (if (fboundp 'comment-padright) - ;; Try and use the proper comment marker, - ;; e.g. ";;" rather than ";". - (progn - ;; XEmacs: comment-normalize-vars - ;; (newcomment.el) only in >= 21.5 - (and (fboundp 'comment-normalize-vars) - (comment-normalize-vars)) - (comment-padright comment-start - (comment-add nil))) + (progn + ;; Try and use the proper comment marker, + ;; e.g. ";;" rather than ";". + (comment-normalize-vars) + (comment-padright comment-start + (comment-add nil)) comment-start) " ") "") -- 2.7.4