[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 7e4533ab45 65/84: Add compatibility notices to t
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 7e4533ab45 65/84: Add compatibility notices to the end of the docstring |
Date: |
Tue, 3 Jan 2023 08:57:36 -0500 (EST) |
branch: externals/compat
commit 7e4533ab4558ee4417db44fa6bab868d61fffa92
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add compatibility notices to the end of the docstring
This is done to avoid hidden overlong documentation strings without
folding the first line of the documentation string.
In addition to that, references to the Compat manual are inserted if
possible.
---
.dir-locals.el | 1 -
compat-macs.el | 25 ++++++++++++++++++-------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index 900dee5f90..6d22de33f5 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -2,6 +2,5 @@
;;; For more information see (info "(emacs) Directory Variables")
((emacs-lisp-mode
- (byte-compile-docstring-max-column . 100)
(show-trailing-whitespace . t)
(indent-tabs-mode . nil)))
diff --git a/compat-macs.el b/compat-macs.el
index fa0f6ea74a..2e8b38e74e 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -193,13 +193,24 @@ attributes (see `compat-generate-common')."
((eq type 'macro) "macro")
((eq type 'advice) "advice")
((error "Unknown type")))))
- (if version
- (format
- "[Compatibility %s for `%S', defined in Emacs %s]\n\n%s"
- type oldname version docstring)
- (format
- "[Compatibility %s for `%S']\n\n%s"
- type oldname docstring)))
+ (with-temp-buffer
+ (insert docstring)
+ (newline 2)
+ (insert
+ "[Compatibility "
+ (if version
+ (format
+ "%s for `%S', defined in Emacs %s. \
+If this is not documented on your system, you can check \
+`(compat) Emacs %s' for more details."
+ type oldname version version)
+ (format
+ "code %s for `%S'"
+ type oldname))
+ "]")
+ (let ((fill-column 80))
+ (fill-region (point-min) (point-max)))
+ (buffer-string)))
;; Advice may use the implicit variable `oldfun', but
;; to avoid triggering the byte compiler, we make
;; sure the argument is used at least once.
- [elpa] externals/compat 59cd42a912 60/84: Generate test names without double-dashes, (continued)
- [elpa] externals/compat 59cd42a912 60/84: Generate test names without double-dashes, ELPA Syncer, 2023/01/03
- [elpa] externals/compat b0f8f6eaac 61/84: Remove realname for ntake, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 45028d9fa7 64/84: Merge branch 'master' into emacs-29.1, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 68c6ccd5cc 68/84: Always load compat-macs, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 54565a768c 73/84: Abbreviate Makefile by re-using BYTEC, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 661ba3a441 74/84: Use 'equal' instead of 'file-equal-p', ELPA Syncer, 2023/01/03
- [elpa] externals/compat 55080acac2 82/84: Preliminary bump the version tag to 29.1.0.0-dev, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 4bd1226048 59/84: Rewrite take to copy only as much as required, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 835b4301b4 62/84: Add 'pure' and 'side-effect-free' properties to take, ELPA Syncer, 2023/01/03
- [elpa] externals/compat e7413bcf2b 63/84: Document additional missing functions from compat-29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 7e4533ab45 65/84: Add compatibility notices to the end of the docstring,
ELPA Syncer <=
- [elpa] externals/compat 2ad7057293 70/84: Always load compat-macs.el while compiling, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 59e50fc7f4 71/84: Remove compat-macs.el from the list of files to byte-compile, ELPA Syncer, 2023/01/03
- [elpa] externals/compat a660d13326 75/84: Add while-let from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat fcac0fa893 81/84: Update copyright years, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 8fbc3b6ea6 69/84: Bump to version 28.1.2.2, ELPA Syncer, 2023/01/03
- [elpa] externals/compat f42ebfaf97 35/84: Use compat--directory-name-p instead of directory-name-p, ELPA Syncer, 2023/01/03
- [elpa] externals/compat b98e7cc868 39/84: Fix gv-expander for compat-alist-get, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 0e4da35d72 46/84: Add functions and macros from keymap.el, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 11c9917215 51/84: Declare alist-get for usage in compat-alist-get, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 145d344d37 45/84: Add prefixed define-key from Emacs 29.1, ELPA Syncer, 2023/01/03