summaryrefslogtreecommitdiff
path: root/lisp/elide-head.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-01-03 09:02:29 +0100
committerStefan Kangas <stefan@marxist.se>2022-01-03 09:04:09 +0100
commitbd9a09bb6b9d636386b8336089e21f0ec15091cf (patch)
tree377bf64e7990a8652d9c9efd1e4f1558cf6ec4cb /lisp/elide-head.el
parent61c35e415cd4c8046f9b08c29f97a7cf29640c94 (diff)
downloademacs-bd9a09bb6b9d636386b8336089e21f0ec15091cf.tar.gz
elide-head: Make GPL regexp more forgiving
* lisp/elide-head.el (elide-head-headers-to-hide): Make GPL regexp more forgiving. * test/lisp/elide-head-tests.el (elide-head--add-test): New macro. (elide-head--test-headers-to-hide/gpl2-1) (elide-head--test-headers-to-hide/gpl3-1) (elide-head--test-headers-to-hide/gpl3-2) (elide-head--test-headers-to-hide/gpl3-3) (elide-head--test-headers-to-hide/gpl3-4): New tests.
Diffstat (limited to 'lisp/elide-head.el')
-rw-r--r--lisp/elide-head.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/elide-head.el b/lisp/elide-head.el
index 619d350c803..dab51cabc41 100644
--- a/lisp/elide-head.el
+++ b/lisp/elide-head.el
@@ -52,9 +52,14 @@
(defcustom elide-head-headers-to-hide
`(;; GNU GPL
("is free software[:;] you can redistribute it" .
- "\\(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 (seq "If not, see " (? "<")
+ "http" (? "s") "://www.gnu.org/licenses/"
+ (? ">") (? " "))
+ (seq "Boston, MA " (? " ")
+ "0211" (or "1-1307" "0-1301")
+ (or " " ", ") "USA")
+ "675 Mass Ave, Cambridge, MA 02139, USA")
+ (? ".")))
;; FreeBSD license / Modified BSD license (3-clause)
(,(rx (or "The Regents of the University of California. All rights reserved."
"Redistribution and use in source and binary"))