From 7749ec6aaa678caa126b5027c93bee1736924939 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 20 May 2022 21:11:48 +0200 Subject: [PATCH] Remove some ancient Emacs compat code * lisp/url/url-util.el (url-percentage): Remove Emacs 19 compat code. * lisp/erc/erc-backend.el (erc-server-coding-system): * lisp/gnus/mm-util.el (mm-iso-8859-x-to-15-table): Remove Emacs 19 compat code; coding-system-p is fboundp. * lisp/progmodes/cfengine.el (cfengine-fill-paragraph): Remove Emacs 21 compat code. --- lisp/erc/erc-backend.el | 3 +-- lisp/gnus/mm-util.el | 3 +-- lisp/progmodes/cfengine.el | 8 +------- lisp/url/url-util.el | 7 ++----- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 4c13f4c419a..1252a5b4fac 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -315,8 +315,7 @@ This will only be consulted if the coding system in :version "24.1" :type '(repeat coding-system)) -(defcustom erc-server-coding-system (if (and (fboundp 'coding-system-p) - (coding-system-p 'undecided) +(defcustom erc-server-coding-system (if (and (coding-system-p 'undecided) (coding-system-p 'utf-8)) '(utf-8 . undecided) nil) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 31cf92e6172..727e3abfffc 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -315,8 +315,7 @@ Valid elements include: "ISO-8859-15 exchangeable coding systems and inconvertible characters.") (defvar mm-iso-8859-x-to-15-table - (and (fboundp 'coding-system-p) - (mm-coding-system-p 'iso-8859-15) + (and (mm-coding-system-p 'iso-8859-15) (mapcar (lambda (cs) (if (mm-coding-system-p (car cs)) diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 6fc898d95be..00348ac0bb9 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -989,13 +989,7 @@ Intended as the value of `indent-line-function'." (defun cfengine-fill-paragraph (&optional justify) "Fill `paragraphs' in Cfengine code." (interactive "P") - (or (if (fboundp 'fill-comment-paragraph) - (fill-comment-paragraph justify) - ;; else do nothing in a comment - (nth 4 (parse-partial-sexp (save-excursion - (beginning-of-defun) - (point)) - (point)))) + (or (fill-comment-paragraph justify) (let ((paragraph-start ;; Include start of parenthesized block. "\f\\|[ \t]*$\\|.*(") diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index b8b7980e40b..fc84d451760 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -1,7 +1,6 @@ ;;; url-util.el --- Miscellaneous helper routines for URL library -*- lexical-binding: t -*- -;; Copyright (C) 1996-1999, 2001, 2004-2022 Free Software Foundation, -;; Inc. +;; Copyright (C) 1996-2022 Free Software Foundation, Inc. ;; Author: Bill Perry ;; Maintainer: emacs-devel@gnu.org @@ -217,9 +216,7 @@ Will not do anything if `url-show-status' is nil." ;;;###autoload (defun url-percentage (x y) - (if (fboundp 'float) - (round (* 100 (/ x (float y)))) - (/ (* x 100) y))) + (round (* 100 (/ x (float y))))) ;;;###autoload (defalias 'url-basepath 'url-file-directory) -- 2.39.2