emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7749ec6aaa 1/2: Remove some ancient Emacs compat code


From: Stefan Kangas
Subject: master 7749ec6aaa 1/2: Remove some ancient Emacs compat code
Date: Wed, 25 May 2022 03:45:15 -0400 (EDT)

branch: master
commit 7749ec6aaa678caa126b5027c93bee1736924939
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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 4c13f4c419..1252a5b4fa 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 31cf92e617..727e3abfff 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 6fc898d95b..00348ac0bb 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 b8b7980e40..fc84d45176 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 <wmperry@gnu.org>
 ;; 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]