summaryrefslogtreecommitdiff
path: root/lisp/elide-head.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-01-01 14:23:11 +0100
committerStefan Kangas <stefan@marxist.se>2022-01-01 14:26:39 +0100
commit31fefef4a2f8536a23df94df46ecb4b5b4ff1efe (patch)
tree7991ef3a36de48bf8009ed69a9b7535667763286 /lisp/elide-head.el
parent823b6b8d260e6e5bc0c428c9b3d92b6822624761 (diff)
downloademacs-31fefef4a2f8536a23df94df46ecb4b5b4ff1efe.tar.gz
elide-head: Support more licenses
* lisp/elide-head.el (elide-head-headers-to-hide): Add support for the Expat License, and more variants of the BSD-2-Clause License. Add old FSF address. This fixes a bug reported in 2003: https://lists.gnu.org/r/bug-gnu-emacs/2003-01/msg00142.html
Diffstat (limited to 'lisp/elide-head.el')
-rw-r--r--lisp/elide-head.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/elide-head.el b/lisp/elide-head.el
index d2e3ac6a996..30772fa514b 100644
--- a/lisp/elide-head.el
+++ b/lisp/elide-head.el
@@ -50,13 +50,16 @@
:group 'tools)
(defcustom elide-head-headers-to-hide
- '(("is free software[:;] you can redistribute it" . ; GNU boilerplate
- "\\(Boston, MA 0211\\(1-1307\\|0-1301\\), USA\\|\
-If not, see <https?://www\\.gnu\\.org/licenses/>\\)\\.")
- ("The Regents of the University of California\\. All rights reserved\\." .
- "SUCH DAMAGE\\.") ; BSD
- ("Permission is hereby granted, free of charge" . ; X11
- "authorization from the X Consortium\\."))
+ `(("is free software[:;] you can redistribute it" . ; GNU boilerplate
+ "\\(If not, see <https?://www\\.gnu\\.org/licenses/>\\|\
+Boston, MA 0211\\(1-1307\\|0-1301\\), USA\\|\
+675 Mass Ave, Cambridge, MA 02139, USA\\)\\.")
+ (,(rx (or "The Regents of the University of California. All rights reserved."
+ "Redistribution and use in source and binary"))
+ . "THE POSSIBILITY OF SUCH DAMAGE\\.") ; BSD
+ ("Permission is hereby granted, free of charge" .
+ ,(rx (or "authorization from the X Consortium." ; X11
+ "THE USE OR OTHER DEALINGS IN THE SOFTWARE.")))) ; Expat
"Alist of regexps defining start and end of text to elide.
The cars of elements of the list are searched for in order. Text is
@@ -64,7 +67,8 @@ elided with an invisible overlay from the end of the line where the
first match is found to the end of the match for the corresponding
cdr."
:type '(alist :key-type (regexp :tag "Start regexp")
- :value-type (regexp :tag "End regexp")))
+ :value-type (regexp :tag "End regexp"))
+ :version "29.1")
(defvar-local elide-head-overlay nil)