diff options
| author | Stefan Kangas | 2022-12-27 18:12:02 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-12-27 18:16:58 +0100 |
| commit | efc44727daaee4d3f9aeb19864074472e99b296a (patch) | |
| tree | e4969356fb5961b3a81d6ea0694500aeab0dc3aa | |
| parent | fb0ff54eb45ba9fc939d07740c895ed2ef58c406 (diff) | |
| download | emacs-efc44727daaee4d3f9aeb19864074472e99b296a.tar.gz emacs-efc44727daaee4d3f9aeb19864074472e99b296a.zip | |
Support Apache License 2.0 in elide-head-mode
* lisp/elide-head.el (elide-head-headers-to-hide): Add the Apache
License, Version 2.0.
* test/lisp/elide-head-tests.el (apache1-1): New test.
| -rw-r--r-- | lisp/elide-head.el | 10 | ||||
| -rw-r--r-- | test/lisp/elide-head-tests.el | 22 |
2 files changed, 29 insertions, 3 deletions
diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 7f565d346d4..71e7e67e3f7 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el | |||
| @@ -79,8 +79,12 @@ | |||
| 79 | . "POSSIBILITY OF SUCH DAMAGE\\.") | 79 | . "POSSIBILITY OF SUCH DAMAGE\\.") |
| 80 | ;; X11 and Expat | 80 | ;; X11 and Expat |
| 81 | ("Permission is hereby granted, free of charge" . | 81 | ("Permission is hereby granted, free of charge" . |
| 82 | ,(rx (or "authorization from the X Consortium." ; X11 | 82 | ,(rx (or "authorization from the X Consortium." ; X11 |
| 83 | "THE USE OR OTHER DEALINGS IN THE SOFTWARE."))))) ; Expat | 83 | "THE USE OR OTHER DEALINGS IN THE SOFTWARE."))) ; Expat |
| 84 | ;; Apache | ||
| 85 | ("Licensed under the Apache License, Version 2.0" . | ||
| 86 | "limitations under the License.") | ||
| 87 | )) | ||
| 84 | "Alist of regexps defining start and end of text to elide. | 88 | "Alist of regexps defining start and end of text to elide. |
| 85 | 89 | ||
| 86 | The cars of elements of the list are searched for in order. Text is | 90 | The cars of elements of the list are searched for in order. Text is |
| @@ -91,7 +95,7 @@ cdr. | |||
| 91 | This affects `elide-head-mode'." | 95 | This affects `elide-head-mode'." |
| 92 | :type '(alist :key-type (regexp :tag "Start regexp") | 96 | :type '(alist :key-type (regexp :tag "Start regexp") |
| 93 | :value-type (regexp :tag "End regexp")) | 97 | :value-type (regexp :tag "End regexp")) |
| 94 | :version "29.1") | 98 | :version "30.1") |
| 95 | 99 | ||
| 96 | (defvar-local elide-head-overlay nil) | 100 | (defvar-local elide-head-overlay nil) |
| 97 | 101 | ||
diff --git a/test/lisp/elide-head-tests.el b/test/lisp/elide-head-tests.el index 293fb0dc09d..3d6e7686935 100644 --- a/test/lisp/elide-head-tests.el +++ b/test/lisp/elide-head-tests.el | |||
| @@ -285,6 +285,28 @@ | |||
| 285 | " "This program is distributed in the hope that") | 285 | " "This program is distributed in the hope that") |
| 286 | 286 | ||
| 287 | 287 | ||
| 288 | ;;; Apache License | ||
| 289 | |||
| 290 | (elide-head--add-test apache1-1 "\ | ||
| 291 | /* | ||
| 292 | * Copyright 2011-2016 The Pkcs11Interop Project | ||
| 293 | * | ||
| 294 | * Licensed under the Apache License, Version 2.0 (the \"License\"); | ||
| 295 | * you may not use this file except in compliance with the License. | ||
| 296 | * You may obtain a copy of the License at | ||
| 297 | * | ||
| 298 | * https://www.apache.org/licenses/LICENSE-2.0 | ||
| 299 | * | ||
| 300 | * Unless required by applicable law or agreed to in writing, software | ||
| 301 | * distributed under the License is distributed on an \"AS IS\" BASIS, | ||
| 302 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 303 | * See the License for the specific language governing permissions and | ||
| 304 | * limitations under the License. | ||
| 305 | */ | ||
| 306 | " "Unless required by applicable law") | ||
| 307 | |||
| 308 | |||
| 309 | |||
| 288 | ;;; Obsolete | 310 | ;;; Obsolete |
| 289 | 311 | ||
| 290 | (with-suppressed-warnings ((obsolete elide-head) | 312 | (with-suppressed-warnings ((obsolete elide-head) |