emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat 6b37982680 11/14: Deprecate compat-help and comp


From: ELPA Syncer
Subject: [elpa] externals/compat 6b37982680 11/14: Deprecate compat-help and compat-font-lock
Date: Tue, 3 Jan 2023 10:57:28 -0500 (EST)

branch: externals/compat
commit 6b37982680b9ea347ffb38d8e478de455fa1f355
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Deprecate compat-help and compat-font-lock
    
    The main focus of compat.el is to provide compatibility functions for 
packages.
    This functionality should be as robust and well-maintained as possible.
    Auxiliary fancy features are a distraction. If there is interest, these 
features
    could be provided as part of a compat-user library.
---
 Makefile            |  4 +---
 NEWS.org            |  1 +
 compat-font-lock.el | 30 +++---------------------------
 compat-help.el      | 39 +++------------------------------------
 compat.texi         | 28 +---------------------------
 5 files changed, 9 insertions(+), 93 deletions(-)

diff --git a/Makefile b/Makefile
index 31d761945b..aa40be9695 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,7 @@
 
 EMACS = emacs
 MAKEINFO = makeinfo
-BYTEC = compat-help.elc \
-       compat-font-lock.elc \
-       compat-24.elc \
+BYTEC = compat-24.elc \
        compat-25.elc \
        compat-26.elc \
        compat-27.elc \
diff --git a/NEWS.org b/NEWS.org
index 3dbae21676..c2f27e7593 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -4,6 +4,7 @@
 * Development
 
 - Drop support for Emacs 24.3
+- Deprecate compat-help.el and compat-font-lock.el
 
 * Release of "Compat" Version 28.1.2.2
 
diff --git a/compat-font-lock.el b/compat-font-lock.el
index 5a8626fb99..4225c9269e 100644
--- a/compat-font-lock.el
+++ b/compat-font-lock.el
@@ -1,9 +1,6 @@
-;;; compat-font-lock.el ---                          -*- lexical-binding: t; 
-*-
+;;; compat-font-lock.el --- Obsolete package -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2022, 2023 Free Software Foundation, Inc.
-
-;; Author: Philip Kaludercic <philipk@posteo.net>
-;; Keywords:
+;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -19,30 +16,9 @@
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-
-;; Optional font-locking for `compat' definitions.  Every symbol with
-;; an active compatibility definition will be highlighted.
-;;
-;; Load this file to enable the functionality.
-
 ;;; Code:
 
-(eval-and-compile
-  (require 'cl-lib)
-  (require 'compat-macs))
-
-(defvar compat-generate-common-fn)
-(let ((compat-generate-common-fn
-       (lambda (name _def-fn _install-fn check-fn attr _type)
-         (unless (and (plist-get attr :no-highlight)
-                      (funcall check-fn))
-           `(font-lock-add-keywords
-             'emacs-lisp-mode
-             ',`((,(concat "\\_<\\("
-                           (regexp-quote (symbol-name name))
-                           "\\)\\_>")
-                  1 font-lock-preprocessor-face prepend)))))))
-  (load "compat"))
+(warn "compat-font-lock has been deprecated")
 
 (provide 'compat-font-lock)
 ;;; compat-font-lock.el ends here
diff --git a/compat-help.el b/compat-help.el
index a796d944d8..1c7118b414 100644
--- a/compat-help.el
+++ b/compat-help.el
@@ -1,8 +1,6 @@
-;;; compat-help.el --- Documentation for compat functions  -*- 
lexical-binding: t; -*-
+;;; compat-help.el --- Obsolete package  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2022, 2023  Free Software Foundation, Inc.
-
-;; Author: Philip Kaludercic <philipk@posteo.net>
+;; Copyright (C) 2022-2023  Free Software Foundation, Inc.
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -18,40 +16,9 @@
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-
-;; Load this file to insert `compat'-relevant documentation next to
-;; the regular documentation of a symbol.
-
 ;;; Code:
 
-(defun compat---describe (symbol)
-  "Insert documentation for SYMBOL if it has compatibility code."
-  (let ((compat (get symbol 'compat-def)))
-    (when compat
-      (let ((doc (get compat 'compat-doc))
-            (start (point)))
-        (when doc
-          (insert "There is a ")
-          (insert-button
-           "compatibility notice"
-           'action (let ((type (get compat 'compat-type)))
-                     (cond
-                      ((memq type '(func macro advice))
-                       #'find-function)
-                      ((memq type '(variable))
-                       #'find-variable)
-                      ((error "Unknown type"))))
-           'button-data compat)
-          (insert (format " for %s (for versions of Emacs before %s):"
-                          (symbol-name symbol)
-                          (get compat 'compat-version)))
-          (add-text-properties start (point) '(face bold))
-          (newline 2)
-          (insert (substitute-command-keys doc))
-          (fill-region start (point))
-          (newline 2))))))
-
-(add-hook 'help-fns-describe-function-functions #'compat---describe)
+(warn "compat-help has been deprecated")
 
 (provide 'compat-help)
 ;;; compat-help.el ends here
diff --git a/compat.texi b/compat.texi
index bd75e43a13..9e51aa6cc4 100644
--- a/compat.texi
+++ b/compat.texi
@@ -67,10 +67,6 @@ Introduction
 * Usage::
 * Intentions::
 
-Usage
-
-* Additional libraries::
-
 Support
 
 * Emacs 24.4::                   Compatibility support for Emacs 24.4
@@ -103,11 +99,6 @@ or support old versions of Emacs.
 Version 24.4 is chosen as the oldest version we can reasonably support,
 since subr-x was introduced in this version.
 
-If you are developing a package with Compat in mind, consider loading
-`compat-help` (on your system, not in a package) to get relevant notes
-inserted into the help buffers of functions that are implemented or
-advised in Compat.
-
 Note that Compat provides a few prefixed function, ie. functions with a
 @code{compat-} prefix.  These are used to provide extended functionality
 for commands that are already defined (@code{sort}, @code{assoc},
@@ -151,24 +142,6 @@ It is recommended to subscribe to the
 mailing list to be notified when new versions are released or relevant
 changes are made.
 
-@menu
-* Additional libraries::
-@end menu
-
-@node Additional libraries
-@subsection Additional libraries
-
-These libraries are packages with Compat, but are disabled by default.
-To use them you can use @code{M-x load-library}:
-
-@table @asis
-@item compat-help
-Add notes to @code{*Help*} buffer, if a compatibility definition has
-something to warn you about.
-@item compat-font-lock
-Highlight functions that are implemented as compatibility definitions.
-@end table
-
 @node Intentions
 @section Intentions
 
@@ -222,6 +195,7 @@ manage to provide for each Emacs version.
 * Emacs 26.1::                   Compatibility support for Emacs 26.1
 * Emacs 27.1::                   Compatibility support for Emacs 27.1
 * Emacs 28.1::                   Compatibility support for Emacs 28.1
+* Emacs 29.1::                   Compatibility support for Emacs 29.1
 @end menu
 
 @node Emacs 24.4



reply via email to

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