From 7b2448ae6eaf4ae5f81f1a1b1b9f1b14735e90d6 Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Wed, 17 Feb 2021 00:54:38 +0100 Subject: cperl-mode: Improve detection of index entries for imenu * lisp/progmodes/cperl-mode.el (cperl-imenu-addback): Customization variable deleted. This variable has been declared obsolete in 1998. (cperl--basic-identifier-regexp) and many other variables: defining regular expressions for basic Perl constructs. (cperl-imenu--create-perl-index): This function has been completely rewritten, keeping only some parts of the output formatting. It now recognizes a lot more package and subroutine declarations which came since Perl 5.14: Packages with a version and/or a block attached, lexical subroutines, declarations with a newline between the keyword "package" and the package name, and several more. This version also correctly separates subroutine names from attributes, does no longer support "unnamed" packages (which don't exist in Perl), and doesn't fall for false positives like stuff that looks like a declaration in a multiline string. (cperl-tags-hier-init): Eliminate call to `cperl-imenu-addback` (which actually was commented out in 1997) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test--validate-regexp) and six other new tests for the new regular expressions and the index creation. * test/lisp/progmodes/cperl-mode-resources/grammar.pl: New file showcasing different syntax variations for package and sub declarations (bug#46574). --- test/lisp/progmodes/cperl-mode-tests.el | 95 +++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 943c454445c..61e4ece49b7 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -166,6 +166,101 @@ point in the distant past, and is still broken in perl-mode. " (if (match-beginning 3) 0 perl-indent-level))))))) +;;; Grammar based tests: unit tests + +(defun cperl-test--validate-regexp (regexp valid &optional invalid) + "Runs tests for elements of VALID and INVALID lists against REGEXP. +Tests with elements from VALID must match, tests with elements +from INVALID must not match. The match string must be equal to +the whole string." + (funcall cperl-test-mode) + (dolist (string valid) + (should (string-match regexp string)) + (should (string= (match-string 0 string) string))) + (when invalid + (dolist (string invalid) + (should-not + (and (string-match regexp string) + (string= (match-string 0 string) string)))))) + +(ert-deftest cperl-test-ws-regexp () + "Tests capture of very simple regular expressions (yawn)." + (let ((valid + '(" " "\t" "\n")) + (invalid + '("a" " " ""))) + (cperl-test--validate-regexp cperl--ws-regexp + valid invalid))) + +(ert-deftest cperl-test-ws-or-comment-regexp () + "Tests sequences of whitespace and comment lines." + (let ((valid + `(" " "\t#\n" "\n# \n" + ,(concat "# comment\n" "# comment\n" "\n" "#comment\n"))) + (invalid + '("=head1 NAME\n" ))) + (cperl-test--validate-regexp cperl--ws-or-comment-regexp + valid invalid))) + +(ert-deftest cperl-test-version-regexp () + "Tests the regexp for recommended syntax of versions in Perl." + (let ((valid + '("1" "1.1" "1.1_1" "5.032001" + "v120.100.103")) + (invalid + '("alpha" "0." ".123" "1E2" + "v1.1" ; a "v" version string needs at least 3 components + ;; bad examples from "Version numbers should be boring" + ;; by xdg AKA David A. Golden + "1.20alpha" "2.34beta2" "2.00R3"))) + (cperl-test--validate-regexp cperl--version-regexp + valid invalid))) + +(ert-deftest cperl-test-package-regexp () + "Tests the regular expression of Perl package names with versions. +Also includes valid cases with whitespace in strange places." + (let ((valid + '("package Foo" + "package Foo::Bar" + "package Foo::Bar v1.2.3" + "package Foo::Bar::Baz 1.1" + "package \nFoo::Bar\n 1.00")) + (invalid + '("package Foo;" ; semicolon must not be included + "package Foo 1.1 {" ; nor the opening brace + "packageFoo" ; not a package declaration + "package Foo1.1" ; invalid package name + "class O3D::Sphere"))) ; class not yet supported + (cperl-test--validate-regexp cperl--package-regexp + valid invalid))) + +;;; Function test: Building an index for imenu + +(ert-deftest cperl-test-imenu-index () + "Test index creation for imenu. +This test relies on the specific layout of the index alist as +created by CPerl mode, so skip it for Perl mode." + (skip-unless (eq cperl-test-mode #'cperl-mode)) + (with-temp-buffer + (insert-file (ert-resource-file "grammar.pl")) + (cperl-mode) + (let ((index (cperl-imenu--create-perl-index)) + current-list) + (setq current-list (assoc-string "+Unsorted List+..." index)) + (should current-list) + (let ((expected '("(main)::outside" + "Package::in_package" + "Shoved::elsewhere" + "Package::prototyped" + "Versioned::Package::versioned" + "Block::attr" + "Versioned::Package::outer" + "lexical" + "Versioned::Block::signatured" + "Package::in_package_again"))) + (dolist (sub expected) + (should (assoc-string sub index))))))) + ;;; Tests for issues reported in the Bug Tracker (defun cperl-test--run-bug-10483 () -- cgit v1.2.3 From 261d0f8f74961859d3f801ed7c5205e3eeb80e31 Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Thu, 18 Mar 2021 08:06:13 +0100 Subject: cperl-mode: Don't interpret y_ as start of y// function. * lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Avoid treating underscores as word-terminators. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-47112): Test case for that bug (bug#47112). --- lisp/progmodes/cperl-mode.el | 33 ++++++++++++++++++--------------- test/lisp/progmodes/cperl-mode-tests.el | 26 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 15 deletions(-) (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index cc7614dd107..7612f8d284a 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3927,21 +3927,24 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', bb (char-after (1- (match-beginning b1))) ; tmp holder ;; bb == "Not a stringy" bb (if (eq b1 10) ; user variables/whatever - (and (memq bb (append "$@%*#_:-&>" nil)) ; $#y) - (cond ((eq bb ?-) (eq c ?s)) ; -s file test - ((eq bb ?\:) ; $opt::s - (eq (char-after - (- (match-beginning b1) 2)) - ?\:)) - ((eq bb ?\>) ; $foo->s - (eq (char-after - (- (match-beginning b1) 2)) - ?\-)) - ((eq bb ?\&) - (not (eq (char-after ; &&m/blah/ - (- (match-beginning b1) 2)) - ?\&))) - (t t))) + (or + ; false positive: "y_" has no word boundary + (save-match-data (looking-at "_")) + (and (memq bb (append "$@%*#_:-&>" nil)) ; $#y) + (cond ((eq bb ?-) (eq c ?s)) ; -s file test + ((eq bb ?\:) ; $opt::s + (eq (char-after + (- (match-beginning b1) 2)) + ?\:)) + ((eq bb ?\>) ; $foo->s + (eq (char-after + (- (match-beginning b1) 2)) + ?\-)) + ((eq bb ?\&) + (not (eq (char-after ; &&m/blah/ + (- (match-beginning b1) 2)) + ?\&))) + (t t)))) ;; or <$file> (and (eq c ?\<) ;; Do not stringify , <$fh> : diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 61e4ece49b7..f0e15022d03 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -447,4 +447,30 @@ have a face property." ;; The yadda-yadda operator should not be in a string. (should (equal (nth 8 (cperl-test-ppss code "\\.")) nil)))) +(ert-deftest cperl-test-bug-47112 () + "Check that in a bareword starting with a quote-like operator +followed by an underscore is not interpreted as that quote-like +operator. Also check that a quote-like operator followed by a +colon (which is, like ?_, a symbol in CPerl mode) _is_ identified +as that quote like operator." + (with-temp-buffer + (funcall cperl-test-mode) + (insert "sub y_max { q:bar:; y _bar_foo_; }") + (goto-char (point-min)) + (cperl-update-syntaxification (point-max)) + (font-lock-fontify-buffer) + (search-forward "max") + (should (equal (get-text-property (match-beginning 0) 'face) + 'font-lock-function-name-face)) + (search-forward "bar") + (should (equal (get-text-property (match-beginning 0) 'face) + 'font-lock-string-face)) + ; perl-mode doesn't highlight + (when (eq cperl-test-mode #'cperl-mode) + (search-forward "_") + (should (equal (get-text-property (match-beginning 0) 'face) + (if (eq cperl-test-mode #'cperl-mode) + 'font-lock-constant-face + font-lock-string-face)))))) + ;;; cperl-mode-tests.el ends here -- cgit v1.2.3 From a9a4af6ff18487938f4859418e8e27ffb174af7c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 18 Mar 2021 14:32:36 -0400 Subject: * test/lisp/progmodes/cperl-mode-tests.el: Silence warnings (cperl-test-bug-47112): Actually obey the major-mode for the test. --- test/lisp/progmodes/cperl-mode-tests.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index f0e15022d03..8078e9c9fa9 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -135,6 +135,9 @@ point in the distant past, and is still broken in perl-mode. " (should (equal (nth 3 (syntax-ppss)) nil)) (should (equal (nth 4 (syntax-ppss)) t)))))) +(defvar perl-continued-statement-offset) +(defvar perl-indent-level) + (ert-deftest cperl-test-heredocs () "Test that HERE-docs are fontified with the appropriate face." (require 'perl-mode) @@ -242,7 +245,7 @@ This test relies on the specific layout of the index alist as created by CPerl mode, so skip it for Perl mode." (skip-unless (eq cperl-test-mode #'cperl-mode)) (with-temp-buffer - (insert-file (ert-resource-file "grammar.pl")) + (insert-file-contents (ert-resource-file "grammar.pl")) (cperl-mode) (let ((index (cperl-imenu--create-perl-index)) current-list) @@ -457,8 +460,8 @@ as that quote like operator." (funcall cperl-test-mode) (insert "sub y_max { q:bar:; y _bar_foo_; }") (goto-char (point-min)) - (cperl-update-syntaxification (point-max)) - (font-lock-fontify-buffer) + (syntax-propertize (point-max)) + (font-lock-ensure) (search-forward "max") (should (equal (get-text-property (match-beginning 0) 'face) 'font-lock-function-name-face)) -- cgit v1.2.3 From 1ac8cd3ef673054720d88dbc5019677d70d3c26c Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Wed, 24 Mar 2021 17:06:21 +0100 Subject: perl-mode: Fix regexps for fontification * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-declarations): New test to ensure consistency between perl-mode.el and cperl-mode.el (bug#47345). * lisp/progmodes/perl-mode.el (perl-font-lock-keywords-1): pick correct capture groups for "use Pack::Age;" Fontify all components of "Pack::Age", not just "Pack" (perl-font-lock-keywords-2): Use keyword-face for declarators --- lisp/progmodes/perl-mode.el | 6 +++--- test/lisp/progmodes/cperl-mode-tests.el | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index c7fa5ab84b0..fd23683bc0a 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -170,9 +170,9 @@ ;; (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t)) ;; ;; Fontify function and package names in declarations. - ("\\<\\(package\\|sub\\)\\>[ \t]*\\(\\sw+\\)?" + ("\\<\\(package\\|sub\\)\\>[ \t]*\\(\\(?:\\sw\\|::\\)+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) - ("\\(^\\|[^$@%&\\]\\)\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\sw+\\)?" + ("\\(?:^\\|[^$@%&\\]\\)\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\(?:\\sw\\|::\\)+\\)?" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))) "Subdued level highlighting for Perl mode.") @@ -187,7 +187,7 @@ "\\>") ;; ;; Fontify declarators and prefixes as types. - ("\\<\\(has\\|local\\|my\\|our\\|state\\)\\>" . font-lock-type-face) ; declarators + ("\\<\\(has\\|local\\|my\\|our\\|state\\)\\>" . font-lock-keyword-face) ; declarators ;; ;; Fontify function, variable and file name references. ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face) diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 8078e9c9fa9..14bc48b92fd 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -135,6 +135,25 @@ point in the distant past, and is still broken in perl-mode. " (should (equal (nth 3 (syntax-ppss)) nil)) (should (equal (nth 4 (syntax-ppss)) t)))))) +(ert-deftest cperl-test-fontify-declarations () + "Test that declarations and package usage use consistent fontification." + (with-temp-buffer + (funcall cperl-test-mode) + (insert "package Foo::Bar;\n") + (insert "use Fee::Fie::Foe::Foo\n;") + (insert "my $xyzzy = 'PLUGH';\n") + (goto-char (point-min)) + (font-lock-ensure) + (search-forward "Bar") + (should (equal (get-text-property (match-beginning 0) 'face) + 'font-lock-function-name-face)) + (search-forward "use") ; This was buggy in perl-mode + (should (equal (get-text-property (match-beginning 0) 'face) + 'font-lock-keyword-face)) + (search-forward "my") + (should (equal (get-text-property (match-beginning 0) 'face) + 'font-lock-keyword-face)))) + (defvar perl-continued-statement-offset) (defvar perl-indent-level) -- cgit v1.2.3 From 0a4dc70830f5e8286b47120cabc750cca07a75c1 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 19 Apr 2021 12:21:01 +0200 Subject: ; Normalize and add missing first and last lines --- admin/charsets/eucjp-ms.awk | 2 +- admin/charsets/mule-charsets.el | 2 +- admin/unidata/unidata-gen.el | 6 +++--- etc/themes/manoj-dark-theme.el | 2 +- leim/leim-ext.el | 2 +- lisp/allout-widgets.el | 4 +++- lisp/calc/calc-menu.el | 2 ++ lisp/calc/calc-nlfit.el | 2 ++ lisp/cus-theme.el | 6 +++--- lisp/dframe.el | 2 +- lisp/dos-w32.el | 2 +- lisp/emacs-lisp/check-declare.el | 2 +- lisp/emacs-lisp/eieio-custom.el | 2 +- lisp/emacs-lisp/eieio-opt.el | 2 +- lisp/emacs-lisp/eieio-speedbar.el | 2 +- lisp/emacs-lisp/eieio.el | 2 +- lisp/emacs-lisp/tcover-ses.el | 4 ++-- lisp/emacs-lisp/testcover.el | 4 ++-- lisp/emacs-lisp/text-property-search.el | 2 ++ lisp/emacs-lisp/unsafep.el | 2 +- lisp/erc/erc-button.el | 2 +- lisp/erc/erc-desktop-notifications.el | 2 +- lisp/erc/erc-goodies.el | 2 +- lisp/erc/erc-imenu.el | 2 +- lisp/erc/erc-menu.el | 2 +- lisp/erc/erc-page.el | 2 +- lisp/erc/erc-replace.el | 2 +- lisp/erc/erc-ring.el | 2 +- lisp/gnus/gnus-notifications.el | 2 +- lisp/gnus/legacy-gnus-agent.el | 2 +- lisp/gnus/mm-archive.el | 2 +- lisp/gnus/spam-report.el | 2 +- lisp/info.el | 2 +- lisp/language/burmese.el | 2 ++ lisp/language/cham.el | 2 ++ lisp/language/khmer.el | 2 +- lisp/language/sinhala.el | 2 +- lisp/language/tai-viet.el | 2 ++ lisp/language/thai-word.el | 4 ++-- lisp/language/tv-util.el | 3 ++- lisp/leim/quail/croatian.el | 2 +- lisp/leim/quail/hebrew.el | 2 +- lisp/leim/quail/persian.el | 2 +- lisp/mail/rmail-spam-filter.el | 2 +- lisp/mail/uudecode.el | 2 +- lisp/mh-e/mh-search.el | 4 ++-- lisp/net/newst-ticker.el | 2 +- lisp/net/secrets.el | 2 ++ lisp/net/sieve-manage.el | 2 +- lisp/net/sieve-mode.el | 2 +- lisp/net/sieve.el | 2 +- lisp/notifications.el | 2 ++ lisp/nxml/rng-cmpct.el | 2 +- lisp/obsolete/info-edit.el | 2 +- lisp/obsolete/old-emacs-lock.el | 4 ++-- lisp/obsolete/otodo-mode.el | 4 ++-- lisp/obsolete/sb-image.el | 2 +- lisp/org/ob-hledger.el | 2 +- lisp/org/ob-mscgen.el | 4 ++-- lisp/org/ol-eshell.el | 2 +- lisp/org/org-ctags.el | 4 ++-- lisp/org/ox-man.el | 2 +- lisp/progmodes/bug-reference.el | 2 +- lisp/progmodes/cc-awk.el | 2 +- lisp/progmodes/idlw-shell.el | 2 +- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/js.el | 2 +- lisp/progmodes/sql.el | 4 ++-- lisp/ses.el | 2 +- lisp/speedbar.el | 4 ++-- lisp/term/konsole.el | 2 +- lisp/term/linux.el | 4 +++- lisp/term/lk201.el | 2 +- lisp/term/screen.el | 2 +- lisp/term/st.el | 2 +- lisp/term/tmux.el | 2 +- lisp/term/w32console.el | 2 +- lisp/textmodes/remember.el | 2 +- lisp/url/url-mailto.el | 2 +- lisp/vc/vc-dispatcher.el | 2 +- lisp/vc/vc-filewise.el | 2 ++ test/lisp/autorevert-tests.el | 2 +- test/lisp/calendar/icalendar-tests.el | 2 +- test/lisp/calendar/parse-time-tests.el | 2 +- test/lisp/cedet/srecode-utest-template.el | 2 +- test/lisp/custom-resources/custom--test-theme.el | 2 +- test/lisp/descr-text-tests.el | 2 +- test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el | 2 +- test/lisp/emacs-lisp/eieio-tests/eieio-tests.el | 2 +- test/lisp/eshell/em-hist-tests.el | 2 +- test/lisp/eshell/em-ls-tests.el | 2 +- test/lisp/eshell/esh-opt-tests.el | 2 +- test/lisp/eshell/eshell-tests.el | 2 +- test/lisp/gnus/message-tests.el | 2 +- test/lisp/info-xref-tests.el | 2 +- test/lisp/international/ucs-normalize-tests.el | 2 +- test/lisp/net/nsm-tests.el | 2 +- test/lisp/net/shr-tests.el | 2 +- test/lisp/play/cookie1-tests.el | 2 +- test/lisp/progmodes/cperl-mode-tests.el | 2 +- test/lisp/progmodes/perl-mode-tests.el | 2 +- test/lisp/simple-tests.el | 2 +- test/lisp/textmodes/fill-tests.el | 2 +- test/lisp/textmodes/tildify-tests.el | 2 +- test/lisp/thingatpt-tests.el | 2 +- test/lisp/vc/vc-bzr-tests.el | 2 +- test/lisp/xml-tests.el | 2 +- test/manual/cedet/semantic-tests.el | 2 +- test/manual/image-size-tests.el | 2 +- test/manual/image-transforms-tests.el | 2 +- test/manual/scroll-tests.el | 2 +- test/misc/test-custom-noloads.el | 4 ++-- test/src/character-tests.el | 2 +- test/src/editfns-tests.el | 2 +- test/src/emacs-module-tests.el | 2 +- test/src/fileio-tests.el | 2 +- test/src/thread-tests.el | 2 +- test/src/timefns-tests.el | 2 +- 118 files changed, 147 insertions(+), 124 deletions(-) (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/admin/charsets/eucjp-ms.awk b/admin/charsets/eucjp-ms.awk index ca9a317611b..033b37f5ede 100644 --- a/admin/charsets/eucjp-ms.awk +++ b/admin/charsets/eucjp-ms.awk @@ -38,7 +38,7 @@ BEGIN { JISX0208_FROM2 = "/xf5/xa1"; JISX0212_FROM = "/x8f/xf3/xf3"; - print ";;; eucjp-ms.el -- translation table for eucJP-ms -*- lexical-binding:t -*-"; + print ";;; eucjp-ms.el --- translation table for eucJP-ms -*- lexical-binding:t -*-"; print ";;; Automatically generated from /usr/share/i18n/charmaps/EUC-JP-MS.gz"; print "(let ((map"; print " '(;JISEXT<->UNICODE"; diff --git a/admin/charsets/mule-charsets.el b/admin/charsets/mule-charsets.el index 99a8c60d880..7bcceb39b23 100644 --- a/admin/charsets/mule-charsets.el +++ b/admin/charsets/mule-charsets.el @@ -1,4 +1,4 @@ -;; mule-charsets.el -- Generate Mule-original charset maps. -*- lexical-binding: t -*- +;;; mule-charsets.el --- Generate Mule-original charset maps. -*- lexical-binding: t -*- ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el index 221c9b104e0..abd41e34a48 100644 --- a/admin/unidata/unidata-gen.el +++ b/admin/unidata/unidata-gen.el @@ -1,4 +1,4 @@ -;; unidata-gen.el -- Create files containing character property data -*- lexical-binding:t -*- +;;; unidata-gen.el --- Create files containing character property data -*- lexical-binding:t -*- ;; Copyright (C) 2008-2021 Free Software Foundation, Inc. @@ -1446,7 +1446,7 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)." ";; no-byte-compile: t\n" ";; no-update-autoloads: t\n" ";; End:\n\n" - (format ";; %s ends here\n" basename))))) + (format ";;; %s ends here\n" basename))))) (or noninteractive (message "Generating %s...done" file))) (defun unidata-gen-charprop (&optional charprop-file) @@ -1470,7 +1470,7 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)." ";; no-byte-compile: t\n" ";; no-update-autoloads: t\n" ";; End:\n\n" - (format ";; %s ends here\n" + (format ";;; %s ends here\n" (file-name-nondirectory charprop-file))))) diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el index 1f4891c3168..5a527111d35 100644 --- a/etc/themes/manoj-dark-theme.el +++ b/etc/themes/manoj-dark-theme.el @@ -1,4 +1,4 @@ -;;; manoj-dark.el --- A dark theme from Manoj -*- lexical-binding:t -*- +;;; manoj-dark-theme.el --- A dark theme from Manoj -*- lexical-binding:t -*- ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. diff --git a/leim/leim-ext.el b/leim/leim-ext.el index 687379db9f0..904675c0c52 100644 --- a/leim/leim-ext.el +++ b/leim/leim-ext.el @@ -1,4 +1,4 @@ -;; leim-ext.el -- extra leim configuration -*- lexical-binding: t; -*- +;;; leim-ext.el --- extra leim configuration -*- lexical-binding: t; -*- ;; Copyright (C) 2004-2021 Free Software Foundation, Inc. ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 90f3f61b363..0e127040886 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -1,4 +1,4 @@ -;; allout-widgets.el --- Visually highlight allout outline structure. -*- lexical-binding: t; -*- +;;; allout-widgets.el --- Visually highlight allout outline structure. -*- lexical-binding: t; -*- ;; Copyright (C) 2005-2021 Free Software Foundation, Inc. @@ -2296,3 +2296,5 @@ The elements of LIST are not copied, just the list structure itself." ;;;_ , Local variables: ;;;_ , allout-layout: (-1 : 0) ;;;_ , End: + +;;; allout-widgets.el ends here diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el index ac14e36c63c..516f62d7b63 100644 --- a/lisp/calc/calc-menu.el +++ b/lisp/calc/calc-menu.el @@ -1669,3 +1669,5 @@ ["Quit" calc-quit])) (provide 'calc-menu) + +;;; calc-menu.el ends here diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el index 11867f15e5b..f676b098e58 100644 --- a/lisp/calc/calc-nlfit.el +++ b/lisp/calc/calc-nlfit.el @@ -819,3 +819,5 @@ (calc-record traillist "parm"))))) (provide 'calc-nlfit) + +;;; calc-nlfit.el ends here diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index a702fedd245..13fb9f34fa0 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -1,7 +1,7 @@ -;;; cus-theme.el -- custom theme creation user interface -*- lexical-binding: t -*- -;; +;;; cus-theme.el --- custom theme creation user interface -*- lexical-binding: t -*- + ;; Copyright (C) 2001-2021 Free Software Foundation, Inc. -;; + ;; Author: Alex Schroeder ;; Maintainer: emacs-devel@gnu.org ;; Keywords: help, faces diff --git a/lisp/dframe.el b/lisp/dframe.el index f4208f3755a..1ddf11a8aac 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -1,4 +1,4 @@ -;;; dframe --- dedicate frame support modes -*- lexical-binding:t -*- +;;; dframe.el --- dedicate frame support modes -*- lexical-binding:t -*- ;; Copyright (C) 1996-2021 Free Software Foundation, Inc. diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index cf753214624..45daaad8eff 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el @@ -1,4 +1,4 @@ -;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -*- lexical-binding: t; -*- +;;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -*- lexical-binding: t; -*- ;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc. diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index 7c2b23b4ec4..bec4ad92503 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -328,4 +328,4 @@ Returns non-nil if any false statements are found." (provide 'check-declare) -;;; check-declare.el ends here. +;;; check-declare.el ends here diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el index 184b99fdac6..8257f7a4bae 100644 --- a/lisp/emacs-lisp/eieio-custom.el +++ b/lisp/emacs-lisp/eieio-custom.el @@ -1,4 +1,4 @@ -;;; eieio-custom.el -- eieio object customization -*- lexical-binding:t -*- +;;; eieio-custom.el --- eieio object customization -*- lexical-binding:t -*- ;; Copyright (C) 1999-2001, 2005, 2007-2021 Free Software Foundation, ;; Inc. diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index e65f424cbab..08a6debc203 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -1,4 +1,4 @@ -;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar) -*- lexical-binding: t; -*- +;;; eieio-opt.el --- eieio optional functions (debug, printing, speedbar) -*- lexical-binding: t; -*- ;; Copyright (C) 1996, 1998-2003, 2005, 2008-2021 Free Software ;; Foundation, Inc. diff --git a/lisp/emacs-lisp/eieio-speedbar.el b/lisp/emacs-lisp/eieio-speedbar.el index 8bf77e20dfa..c25ea8acee9 100644 --- a/lisp/emacs-lisp/eieio-speedbar.el +++ b/lisp/emacs-lisp/eieio-speedbar.el @@ -1,4 +1,4 @@ -;;; eieio-speedbar.el -- Classes for managing speedbar displays. -*- lexical-binding:t -*- +;;; eieio-speedbar.el --- Classes for managing speedbar displays. -*- lexical-binding:t -*- ;; Copyright (C) 1999-2002, 2005, 2007-2021 Free Software Foundation, ;; Inc. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 910023b841b..31b6b0945bb 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -981,4 +981,4 @@ of `eq'." (provide 'eieio) -;;; eieio ends here +;;; eieio.el ends here diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el index d9db1d3cdc9..4460fef97bd 100644 --- a/lisp/emacs-lisp/tcover-ses.el +++ b/lisp/emacs-lisp/tcover-ses.el @@ -1,4 +1,4 @@ -;;;; testcover-ses.el -- Example use of `testcover' to test "SES" -*- lexical-binding: t; -*- +;;; tcover-ses.el --- Example use of `testcover' to test "SES" -*- lexical-binding: t; -*- ;; Copyright (C) 2002-2021 Free Software Foundation, Inc. @@ -716,4 +716,4 @@ spreadsheet files with invalid formatting." ;;Could do this here: (testcover-end "ses.el") (message "Done")) -;;; testcover-ses.el ends here. +;;; tcover-ses.el ends here diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index 75b27d08e56..e75f15140aa 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -1,4 +1,4 @@ -;;;; testcover.el -- Visual code-coverage tool -*- lexical-binding:t -*- +;;; testcover.el --- Visual code-coverage tool -*- lexical-binding:t -*- ;; Copyright (C) 2002-2021 Free Software Foundation, Inc. @@ -675,4 +675,4 @@ The list is 1valued if all of its constituent elements are also 1valued." (testcover-analyze-coverage (cadr form))) (t (testcover-analyze-coverage-backquote form)))) -;; testcover.el ends here. +;;; testcover.el ends here diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el index e909e4bf760..69943a83f1c 100644 --- a/lisp/emacs-lisp/text-property-search.el +++ b/lisp/emacs-lisp/text-property-search.el @@ -214,3 +214,5 @@ and if a matching region is found, place point at its end." (funcall predicate value prop-value)) (provide 'text-property-search) + +;;; text-property-search.el ends here diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index d52a6c796db..fa4e0583ed3 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -1,4 +1,4 @@ -;;;; unsafep.el -- Determine whether a Lisp form is safe to evaluate -*- lexical-binding: t; -*- +;;; unsafep.el --- Determine whether a Lisp form is safe to evaluate -*- lexical-binding: t; -*- ;; Copyright (C) 2002-2021 Free Software Foundation, Inc. diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 044776c2363..cb9af92ba12 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -1,4 +1,4 @@ -;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*- lexical-binding:t -*- +;;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*- lexical-binding:t -*- ;; Copyright (C) 1996-2004, 2006-2021 Free Software Foundation, Inc. diff --git a/lisp/erc/erc-desktop-notifications.el b/lisp/erc/erc-desktop-notifications.el index 990f013cd2a..9838b239537 100644 --- a/lisp/erc/erc-desktop-notifications.el +++ b/lisp/erc/erc-desktop-notifications.el @@ -1,4 +1,4 @@ -;; erc-desktop-notifications.el -- Send notification on PRIVMSG or mentions -*- lexical-binding:t -*- +;;; erc-desktop-notifications.el --- Send notification on PRIVMSG or mentions -*- lexical-binding:t -*- ;; Copyright (C) 2012-2021 Free Software Foundation, Inc. diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index 1143faa1e26..fc9a8d39ef4 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -1,4 +1,4 @@ -;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*- +;;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2021 Free Software Foundation, Inc. diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el index b2a2dc588e5..dcf6db7407a 100644 --- a/lisp/erc/erc-imenu.el +++ b/lisp/erc/erc-imenu.el @@ -1,4 +1,4 @@ -;;; erc-imenu.el -- Imenu support for ERC -*- lexical-binding: t; -*- +;;; erc-imenu.el --- Imenu support for ERC -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2002, 2004, 2006-2021 Free Software Foundation, ;; Inc. diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el index 0dc819fbbbe..1bee6ff2a67 100644 --- a/lisp/erc/erc-menu.el +++ b/lisp/erc/erc-menu.el @@ -1,4 +1,4 @@ -;; erc-menu.el -- Menu-bar definitions for ERC -*- lexical-binding: t; -*- +;;; erc-menu.el --- Menu-bar definitions for ERC -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2002, 2004-2021 Free Software Foundation, Inc. diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el index 4c244b7984d..457e8cd4684 100644 --- a/lisp/erc/erc-page.el +++ b/lisp/erc/erc-page.el @@ -1,4 +1,4 @@ -;; erc-page.el - CTCP PAGE support for ERC -*- lexical-binding: t; -*- +;;; erc-page.el --- CTCP PAGE support for ERC -*- lexical-binding: t; -*- ;; Copyright (C) 2002, 2004, 2006-2021 Free Software Foundation, Inc. diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el index d08d9850c10..3f69c4cb9cc 100644 --- a/lisp/erc/erc-replace.el +++ b/lisp/erc/erc-replace.el @@ -1,4 +1,4 @@ -;; erc-replace.el -- wash and massage messages inserted into the buffer -*- lexical-binding: t; -*- +;;; erc-replace.el --- wash and massage messages inserted into the buffer -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2002, 2004, 2006-2021 Free Software Foundation, ;; Inc. diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el index 28299ae46c3..666fd585926 100644 --- a/lisp/erc/erc-ring.el +++ b/lisp/erc/erc-ring.el @@ -1,4 +1,4 @@ -;; erc-ring.el -- Command history handling for erc using ring.el -*- lexical-binding: t; -*- +;;; erc-ring.el --- Command history handling for erc using ring.el -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el index a4d198b46e4..8646904637c 100644 --- a/lisp/gnus/gnus-notifications.el +++ b/lisp/gnus/gnus-notifications.el @@ -1,4 +1,4 @@ -;; gnus-notifications.el -- Send notification on new message in Gnus -*- lexical-binding: t; -*- +;;; gnus-notifications.el --- Send notification on new message in Gnus -*- lexical-binding: t; -*- ;; Copyright (C) 2012-2021 Free Software Foundation, Inc. diff --git a/lisp/gnus/legacy-gnus-agent.el b/lisp/gnus/legacy-gnus-agent.el index 091e3899c26..4f800891b2b 100644 --- a/lisp/gnus/legacy-gnus-agent.el +++ b/lisp/gnus/legacy-gnus-agent.el @@ -1,4 +1,4 @@ -;;; gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*- +;;; legacy-gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*- ;; Copyright (C) 2004-2021 Free Software Foundation, Inc. diff --git a/lisp/gnus/mm-archive.el b/lisp/gnus/mm-archive.el index 1ecceeedeb7..fdc83e1de6e 100644 --- a/lisp/gnus/mm-archive.el +++ b/lisp/gnus/mm-archive.el @@ -108,4 +108,4 @@ (provide 'mm-archive) -;; mm-archive.el ends here +;;; mm-archive.el ends here diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 7d93f8a5550..a4234f84001 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -378,4 +378,4 @@ Process queued spam reports." (provide 'spam-report) -;;; spam-report.el ends here. +;;; spam-report.el ends here diff --git a/lisp/info.el b/lisp/info.el index dd7e16f8704..5efac6f25f1 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1,4 +1,4 @@ -;; info.el --- Info package for Emacs -*- lexical-binding:t -*- +;;; info.el --- Info package for Emacs -*- lexical-binding:t -*- ;; Copyright (C) 1985-1986, 1992-2021 Free Software Foundation, Inc. diff --git a/lisp/language/burmese.el b/lisp/language/burmese.el index 373f25ac5ca..ade3566717b 100644 --- a/lisp/language/burmese.el +++ b/lisp/language/burmese.el @@ -55,3 +55,5 @@ (vector "." 0 #'font-shape-gstring)))) (set-char-table-range composition-function-table '(#x1000 . #x107F) elt) (set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt)) + +;;; burmese.el ends here diff --git a/lisp/language/cham.el b/lisp/language/cham.el index 3aac986b437..cbb35565af2 100644 --- a/lisp/language/cham.el +++ b/lisp/language/cham.el @@ -43,3 +43,5 @@ an Austronesian language spoken by some 245,000 Chams in Vietnam and Cambodia."))) (provide 'cham) + +;;; cham.el ends here diff --git a/lisp/language/khmer.el b/lisp/language/khmer.el index 6f08e60d601..471af401656 100644 --- a/lisp/language/khmer.el +++ b/lisp/language/khmer.el @@ -35,4 +35,4 @@ (set-char-table-range composition-function-table '(#x1780 . #x17FF) val) (set-char-table-range composition-function-table '(#x19E0 . #x19FF) val)) -;; khmer.el ends here +;;; khmer.el ends here diff --git a/lisp/language/sinhala.el b/lisp/language/sinhala.el index 99a104ec339..89392ad6c50 100644 --- a/lisp/language/sinhala.el +++ b/lisp/language/sinhala.el @@ -45,4 +45,4 @@ "[\u0D80-\u0DFF]") 0 #'font-shape-gstring))) -;; sinhala.el ends here +;;; sinhala.el ends here diff --git a/lisp/language/tai-viet.el b/lisp/language/tai-viet.el index 4549b111a3d..366c39202d3 100644 --- a/lisp/language/tai-viet.el +++ b/lisp/language/tai-viet.el @@ -56,3 +56,5 @@ The language name is spelled as \"ꪁꪫꪱꪣ ꪼꪕ\", and the script name is spelled as \"ꪎꪳ ꪼꪕ\"."))) (provide 'tai-viet) + +;;; tai-viet.el ends here diff --git a/lisp/language/thai-word.el b/lisp/language/thai-word.el index 7a09bc3a24a..5d0389c28df 100644 --- a/lisp/language/thai-word.el +++ b/lisp/language/thai-word.el @@ -1,4 +1,4 @@ -;;; thai-word.el -- find Thai word boundaries -*- lexical-binding: t; -*- +;;; thai-word.el --- find Thai word boundaries -*- lexical-binding: t; -*- ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) @@ -11074,4 +11074,4 @@ With argument, do this that many times." ;; coding: utf-8 ;; End: -;; thai-word.el ends here +;;; thai-word.el ends here diff --git a/lisp/language/tv-util.el b/lisp/language/tv-util.el index 1a530d350f2..207d76f47c1 100644 --- a/lisp/language/tv-util.el +++ b/lisp/language/tv-util.el @@ -136,5 +136,6 @@ (if (looking-at tai-viet-re) (tai-viet-compose-region from (match-end 0))))) -;; (provide 'tai-viet-util) + +;;; tv-util.el ends here diff --git a/lisp/leim/quail/croatian.el b/lisp/leim/quail/croatian.el index 08f1e47b6f3..7402b81a8cc 100644 --- a/lisp/leim/quail/croatian.el +++ b/lisp/leim/quail/croatian.el @@ -1,4 +1,4 @@ -;;; croatian.el -- Quail package for inputting Croatian -*-coding: utf-8; lexical-binding:t -*- +;;; croatian.el --- Quail package for inputting Croatian -*-coding: utf-8; lexical-binding:t -*- ;; Copyright (C) 2003-2021 Free Software Foundation, Inc. diff --git a/lisp/leim/quail/hebrew.el b/lisp/leim/quail/hebrew.el index fc6bb80596b..28b2eb34367 100644 --- a/lisp/leim/quail/hebrew.el +++ b/lisp/leim/quail/hebrew.el @@ -1,4 +1,4 @@ -;; hebrew.el --- Quail package for inputting Hebrew characters -*- coding: utf-8; lexical-binding: t -*- +;;; hebrew.el --- Quail package for inputting Hebrew characters -*- coding: utf-8; lexical-binding: t -*- ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, ;; 2008, 2009, 2010, 2011 diff --git a/lisp/leim/quail/persian.el b/lisp/leim/quail/persian.el index 4157f886704..cb1f6e3c78b 100644 --- a/lisp/leim/quail/persian.el +++ b/lisp/leim/quail/persian.el @@ -1,4 +1,4 @@ -;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*- +;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*- ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index d833685a8d4..fbac9e0cc0c 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el @@ -555,4 +555,4 @@ checks to see if the old format is used, and updates it if necessary." (provide 'rmail-spam-filter) -;;; rmail-spam-filter ends here +;;; rmail-spam-filter.el ends here diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el index fdd402e0fa0..026356efe97 100644 --- a/lisp/mail/uudecode.el +++ b/lisp/mail/uudecode.el @@ -1,4 +1,4 @@ -;;; uudecode.el -- elisp native uudecode -*- lexical-binding:t -*- +;;; uudecode.el --- elisp native uudecode -*- lexical-binding:t -*- ;; Copyright (C) 1998-2021 Free Software Foundation, Inc. diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 9df7c326564..b3a250bf13a 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el @@ -1,4 +1,4 @@ -;;; mh-search --- MH-Search mode -*- lexical-binding: t; -*- +;;; mh-search.el --- MH-Search mode -*- lexical-binding: t; -*- ;; Copyright (C) 1993, 1995, 2001-2021 Free Software Foundation, Inc. @@ -1943,4 +1943,4 @@ folder buffer." ;; sentence-end-double-space: nil ;; End: -;;; mh-search ends here +;;; mh-search.el ends here diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el index 2f764708701..8cfafb5bfe4 100644 --- a/lisp/net/newst-ticker.el +++ b/lisp/net/newst-ticker.el @@ -1,4 +1,4 @@ -;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding: t; -*- +;;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding: t; -*- ;; Copyright (C) 2003-2021 Free Software Foundation, Inc. diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 94db318c1b0..4102b9d322a 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -957,3 +957,5 @@ to their attributes." ;; * Check, whether the dh-ietf1024-aes128-cbc-pkcs7 algorithm can be ;; used for the transfer of the secrets. Currently, we use the ;; plain algorithm. + +;;; secrets.el ends here diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index c4d6ec4b6cc..5dad5f446ac 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -580,4 +580,4 @@ to local variable `sieve-manage-capability'." (provide 'sieve-manage) -;; sieve-manage.el ends here +;;; sieve-manage.el ends here diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el index 966f0f056bd..0e8fdc0a905 100644 --- a/lisp/net/sieve-mode.el +++ b/lisp/net/sieve-mode.el @@ -206,4 +206,4 @@ Turning on Sieve mode runs `sieve-mode-hook'." (provide 'sieve-mode) -;; sieve-mode.el ends here +;;; sieve-mode.el ends here diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el index 595d63331a4..6d571a0a30f 100644 --- a/lisp/net/sieve.el +++ b/lisp/net/sieve.el @@ -379,4 +379,4 @@ Used to bracket operations which move point in the sieve-buffer." (provide 'sieve) -;; sieve.el ends here +;;; sieve.el ends here diff --git a/lisp/notifications.el b/lisp/notifications.el index b439d822317..ebd74dd3ef2 100644 --- a/lisp/notifications.el +++ b/lisp/notifications.el @@ -420,3 +420,5 @@ version this library is compliant with." notifications-get-server-information-method))) (provide 'notifications) + +;;; notifications.el ends here diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index 3d4b9f87414..1314ade9e31 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el @@ -922,4 +922,4 @@ Current token after parse is token following ]." (provide 'rng-cmpct) -;;; rng-cmpct.el +;;; rng-cmpct.el ends here diff --git a/lisp/obsolete/info-edit.el b/lisp/obsolete/info-edit.el index c53616d80e7..19958979a85 100644 --- a/lisp/obsolete/info-edit.el +++ b/lisp/obsolete/info-edit.el @@ -1,4 +1,4 @@ -;; info-edit.el --- Editing info files -*- lexical-binding:t -*- +;;; info-edit.el --- Editing info files -*- lexical-binding:t -*- ;; Copyright (C) 1985-1986, 1992-2021 Free Software Foundation, Inc. diff --git a/lisp/obsolete/old-emacs-lock.el b/lisp/obsolete/old-emacs-lock.el index 90ff93e03b1..ce4c60e6a17 100644 --- a/lisp/obsolete/old-emacs-lock.el +++ b/lisp/obsolete/old-emacs-lock.el @@ -1,4 +1,4 @@ -;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -*- lexical-binding: t; -*- +;;; old-emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -*- lexical-binding: t; -*- ;; Copyright (C) 1994, 1997, 2001-2021 Free Software Foundation, Inc. @@ -99,4 +99,4 @@ If the buffer is locked, signal error and display its name." (provide 'emacs-lock) -;;; emacs-lock.el ends here +;;; old-emacs-lock.el ends here diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el index add17b265b4..47f5089452f 100644 --- a/lisp/obsolete/otodo-mode.el +++ b/lisp/obsolete/otodo-mode.el @@ -1,4 +1,4 @@ -;;; todo-mode.el --- major mode for editing TODO list files -*- lexical-binding: t; -*- +;;; otodo-mode.el --- major mode for editing TODO list files -*- lexical-binding: t; -*- ;; Copyright (C) 1997, 1999, 2001-2021 Free Software Foundation, Inc. @@ -963,4 +963,4 @@ If INCLUDE-SEP is non-nil, return point after the separator." (provide 'todo-mode) -;;; todo-mode.el ends here +;;; otodo-mode.el ends here diff --git a/lisp/obsolete/sb-image.el b/lisp/obsolete/sb-image.el index e9a507f0086..fc9e03eae6e 100644 --- a/lisp/obsolete/sb-image.el +++ b/lisp/obsolete/sb-image.el @@ -1,4 +1,4 @@ -;;; sb-image --- Image management for speedbar -*- lexical-binding: t; -*- +;;; sb-image.el --- Image management for speedbar -*- lexical-binding: t; -*- ;; Copyright (C) 1999-2003, 2005-2019, 2021 Free Software Foundation, ;; Inc. diff --git a/lisp/org/ob-hledger.el b/lisp/org/ob-hledger.el index 3d2f46cdce2..48dcb8cea1a 100644 --- a/lisp/org/ob-hledger.el +++ b/lisp/org/ob-hledger.el @@ -1,4 +1,4 @@ -;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*- +;;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*- ;; Copyright (C) 2010-2021 Free Software Foundation, Inc. diff --git a/lisp/org/ob-mscgen.el b/lisp/org/ob-mscgen.el index 999d4f4140b..79c9f8702eb 100644 --- a/lisp/org/ob-mscgen.el +++ b/lisp/org/ob-mscgen.el @@ -1,4 +1,4 @@ -;;; ob-msc.el --- Babel Functions for Mscgen -*- lexical-binding: t; -*- +;;; ob-mscgen.el --- Babel Functions for Mscgen -*- lexical-binding: t; -*- ;; Copyright (C) 2010-2021 Free Software Foundation, Inc. @@ -78,4 +78,4 @@ mscgen supported formats." (provide 'ob-mscgen) -;;; ob-msc.el ends here +;;; ob-mscgen.el ends here diff --git a/lisp/org/ol-eshell.el b/lisp/org/ol-eshell.el index 769e7ee5225..8920e0afb0d 100644 --- a/lisp/org/ol-eshell.el +++ b/lisp/org/ol-eshell.el @@ -1,4 +1,4 @@ -;;; ol-eshell.el - Links to Working Directories in Eshell -*- lexical-binding: t; -*- +;;; ol-eshell.el --- Links to Working Directories in Eshell -*- lexical-binding: t; -*- ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 1fca873c159..dc2b3be6326 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -1,5 +1,5 @@ -;;; org-ctags.el - Integrate Emacs "tags" Facility with Org -*- lexical-binding: t; -*- -;; +;;; org-ctags.el --- Integrate Emacs "tags" Facility with Org -*- lexical-binding: t; -*- + ;; Copyright (C) 2007-2021 Free Software Foundation, Inc. ;; Author: Paul Sexton diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el index 6cace7e6989..27d2dedb8ed 100644 --- a/lisp/org/ox-man.el +++ b/lisp/org/ox-man.el @@ -1,4 +1,4 @@ -;; ox-man.el --- Man Back-End for Org Export Engine -*- lexical-binding: t; -*- +;;; ox-man.el --- Man Back-End for Org Export Engine -*- lexical-binding: t; -*- ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index e467d98303e..0c5837cae7e 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -1,4 +1,4 @@ -;; bug-reference.el --- buttonize bug references -*- lexical-binding: t; -*- +;;; bug-reference.el --- buttonize bug references -*- lexical-binding: t; -*- ;; Copyright (C) 2008-2021 Free Software Foundation, Inc. diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 84cc5b115e7..334e82114fc 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -1227,4 +1227,4 @@ comment at the start of cc-engine.el for more info." ;; indent-tabs-mode: t ;; tab-width: 8 ;; End: -;;; awk-mode.el ends here +;;; cc-awk.el ends here diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 134a6c6e497..ad8feb988f5 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -1,4 +1,4 @@ -;; idlw-shell.el --- run IDL as an inferior process of Emacs. -*- lexical-binding:t -*- +;;; idlw-shell.el --- run IDL as an inferior process of Emacs. -*- lexical-binding:t -*- ;; Copyright (C) 1999-2021 Free Software Foundation, Inc. diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 75f2016fc24..b55a98af0b3 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -1,4 +1,4 @@ -;; idlwave.el --- IDL editing mode for GNU Emacs -*- lexical-binding: t; -*- +;;; idlwave.el --- IDL editing mode for GNU Emacs -*- lexical-binding: t; -*- ;; Copyright (C) 1999-2021 Free Software Foundation, Inc. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 6d6063d783c..a942235f474 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4655,4 +4655,4 @@ one of the aforementioned options instead of using this mode." (provide 'js) -;; js.el ends here +;;; js.el ends here diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 6e53a04f72d..65a4094d70d 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -5606,7 +5606,7 @@ The default value disables the internal pager." (provide 'sql) -;;; sql.el ends here - ; LocalWords: sql SQL SQLite sqlite Sybase Informix MySQL ; LocalWords: Postgres SQLServer SQLi + +;;; sql.el ends here diff --git a/lisp/ses.el b/lisp/ses.el index 6058d48ed19..98785b6b938 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1,4 +1,4 @@ -;;; ses.el -- Simple Emacs Spreadsheet -*- lexical-binding:t -*- +;;; ses.el --- Simple Emacs Spreadsheet -*- lexical-binding:t -*- ;; Copyright (C) 2002-2021 Free Software Foundation, Inc. diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 118c7260769..4666026f357 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1,4 +1,4 @@ -;;; speedbar --- quick access to files and tags in a frame -*- lexical-binding: t; -*- +;;; speedbar.el --- quick access to files and tags in a frame -*- lexical-binding: t; -*- ;; Copyright (C) 1996-2021 Free Software Foundation, Inc. @@ -4057,4 +4057,4 @@ this version is not backward compatible to 0.14 or earlier.") (run-hooks 'speedbar-load-hook) -;;; speedbar ends here +;;; speedbar.el ends here diff --git a/lisp/term/konsole.el b/lisp/term/konsole.el index e38a5d34e75..1f65a46011c 100644 --- a/lisp/term/konsole.el +++ b/lisp/term/konsole.el @@ -9,4 +9,4 @@ (provide 'term/konsole) -;; konsole.el ends here +;;; konsole.el ends here diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 35bd3ac0acb..c6d84ab96c3 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el @@ -1,4 +1,6 @@ -;; The Linux console handles Latin-1 by default. -*- lexical-binding:t -*- +;;; linux.el -*- lexical-binding:t -*- + +;; The Linux console handles Latin-1 by default. (declare-function gpm-mouse-enable "t-mouse" ()) diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 3bcaa2ecd18..c2802477670 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el @@ -1,4 +1,4 @@ -;; Define function key sequences for DEC terminals. -*- lexical-binding: t -*- +;;; lk201.el --- Define function key sequences for DEC terminals. -*- lexical-binding: t -*- (defvar lk201-function-map (let ((map (make-sparse-keymap))) diff --git a/lisp/term/screen.el b/lisp/term/screen.el index 04481e8358b..9655f41b6c1 100644 --- a/lisp/term/screen.el +++ b/lisp/term/screen.el @@ -22,4 +22,4 @@ it runs, which can change when the screen session is moved to another tty." (provide 'term/screen) -;; screen.el ends here +;;; screen.el ends here diff --git a/lisp/term/st.el b/lisp/term/st.el index 08432c414af..9a1c0646f89 100644 --- a/lisp/term/st.el +++ b/lisp/term/st.el @@ -17,4 +17,4 @@ (provide 'term/st) -;; st.el ends here +;;; st.el ends here diff --git a/lisp/term/tmux.el b/lisp/term/tmux.el index aa0c98364f3..4ea6f416c8c 100644 --- a/lisp/term/tmux.el +++ b/lisp/term/tmux.el @@ -22,4 +22,4 @@ it runs, which can change when the tmux session is moved to another tty." (provide 'term/tmux) -;; tmux.el ends here +;;; tmux.el ends here diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el index 4a925cd84c3..1a5dc05783e 100644 --- a/lisp/term/w32console.el +++ b/lisp/term/w32console.el @@ -1,4 +1,4 @@ -;;; w32console.el -- Setup w32 console keys and colors. -*- lexical-binding: t; -*- +;;; w32console.el --- Setup w32 console keys and colors. -*- lexical-binding: t; -*- ;; Copyright (C) 2007-2021 Free Software Foundation, Inc. diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 8a0436afc64..4acdc9f4d87 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -1,4 +1,4 @@ -;;; remember --- a mode for quickly jotting down things to remember -*- lexical-binding: t; -*- +;;; remember.el --- a mode for quickly jotting down things to remember -*- lexical-binding: t; -*- ;; Copyright (C) 1999-2001, 2003-2021 Free Software Foundation, Inc. diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index c6901d99200..29c2780121a 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el @@ -1,4 +1,4 @@ -;;; url-mail.el --- Mail Uniform Resource Locator retrieval code -*- lexical-binding: t; -*- +;;; url-mailto.el --- Mail Uniform Resource Locator retrieval code -*- lexical-binding: t; -*- ;; Copyright (C) 1996-1999, 2004-2021 Free Software Foundation, Inc. diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 2b477dff0a3..87ca542f1c2 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -1,4 +1,4 @@ -;;; vc-dispatcher.el -- generic command-dispatcher facility. -*- lexical-binding: t -*- +;;; vc-dispatcher.el --- generic command-dispatcher facility. -*- lexical-binding: t -*- ;; Copyright (C) 2008-2021 Free Software Foundation, Inc. diff --git a/lisp/vc/vc-filewise.el b/lisp/vc/vc-filewise.el index e1b042a7424..254e47933d6 100644 --- a/lisp/vc/vc-filewise.el +++ b/lisp/vc/vc-filewise.el @@ -82,3 +82,5 @@ If the file is not registered, or the master name is not known, return nil." nil)))) ; Not registered (provide 'vc-filewise) + +;;; vc-filewise.el ends here diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el index 5f27c2e38a6..3e97e9cfa5b 100644 --- a/test/lisp/autorevert-tests.el +++ b/test/lisp/autorevert-tests.el @@ -1,4 +1,4 @@ -;;; auto-revert-tests.el --- Tests of auto-revert -*- lexical-binding: t -*- +;;; autorevert-tests.el --- Tests of auto-revert -*- lexical-binding: t -*- ;; Copyright (C) 2015-2021 Free Software Foundation, Inc. diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el index 61d3c11f6df..6973f7e5c95 100644 --- a/test/lisp/calendar/icalendar-tests.el +++ b/test/lisp/calendar/icalendar-tests.el @@ -1,4 +1,4 @@ -;; icalendar-tests.el --- Test suite for icalendar.el -*- lexical-binding:t -*- +;;; icalendar-tests.el --- Test suite for icalendar.el -*- lexical-binding:t -*- ;; Copyright (C) 2005, 2008-2021 Free Software Foundation, Inc. diff --git a/test/lisp/calendar/parse-time-tests.el b/test/lisp/calendar/parse-time-tests.el index b90fe0bd85b..b706b73570d 100644 --- a/test/lisp/calendar/parse-time-tests.el +++ b/test/lisp/calendar/parse-time-tests.el @@ -1,4 +1,4 @@ -;; parse-time-tests.el --- Test suite for parse-time.el -*- lexical-binding:t -*- +;;; parse-time-tests.el --- Test suite for parse-time.el -*- lexical-binding:t -*- ;; Copyright (C) 2016-2021 Free Software Foundation, Inc. diff --git a/test/lisp/cedet/srecode-utest-template.el b/test/lisp/cedet/srecode-utest-template.el index f97ff18320e..087dcfd8996 100644 --- a/test/lisp/cedet/srecode-utest-template.el +++ b/test/lisp/cedet/srecode-utest-template.el @@ -1,4 +1,4 @@ -;;; srecode/test.el --- SRecode Core Template tests. -*- lexical-binding:t -*- +;;; srecode-utest-template.el --- SRecode Core Template tests. -*- lexical-binding:t -*- ;; Copyright (C) 2008-2021 Free Software Foundation, Inc. diff --git a/test/lisp/custom-resources/custom--test-theme.el b/test/lisp/custom-resources/custom--test-theme.el index 4ced98a50bc..122bd795692 100644 --- a/test/lisp/custom-resources/custom--test-theme.el +++ b/test/lisp/custom-resources/custom--test-theme.el @@ -1,4 +1,4 @@ -;;; custom--test-theme.el -- A test theme. -*- lexical-binding:t -*- +;;; custom--test-theme.el --- A test theme. -*- lexical-binding:t -*- (deftheme custom--test "A test theme.") diff --git a/test/lisp/descr-text-tests.el b/test/lisp/descr-text-tests.el index 6ba455b50d4..2052dc0e38c 100644 --- a/test/lisp/descr-text-tests.el +++ b/test/lisp/descr-text-tests.el @@ -1,4 +1,4 @@ -;;; descr-text-test.el --- ERT tests for descr-text.el -*- lexical-binding: t -*- +;;; descr-text-tests.el --- ERT tests for descr-text.el -*- lexical-binding: t -*- ;; Copyright (C) 2014, 2016-2021 Free Software Foundation, Inc. diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el index 285616a7806..9f9bb73133c 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el @@ -1,4 +1,4 @@ -;;; eieio-testsinvoke.el -- eieio tests for method invocation -*- lexical-binding:t -*- +;;; eieio-test-methodinvoke.el --- eieio tests for method invocation -*- lexical-binding:t -*- ;; Copyright (C) 2005, 2008, 2010, 2013-2021 Free Software Foundation, ;; Inc. diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el index a47fb8053b9..11ffc115f7e 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el @@ -1,4 +1,4 @@ -;;; eieio-tests.el -- eieio test routines -*- lexical-binding: t -*- +;;; eieio-tests.el --- eieio test routines -*- lexical-binding: t -*- ;; Copyright (C) 1999-2003, 2005-2010, 2012-2021 Free Software ;; Foundation, Inc. diff --git a/test/lisp/eshell/em-hist-tests.el b/test/lisp/eshell/em-hist-tests.el index ec65397fd63..31967a61c3c 100644 --- a/test/lisp/eshell/em-hist-tests.el +++ b/test/lisp/eshell/em-hist-tests.el @@ -1,4 +1,4 @@ -;;; tests/em-hist-tests.el --- em-hist test suite -*- lexical-binding:t -*- +;;; em-hist-tests.el --- em-hist test suite -*- lexical-binding:t -*- ;; Copyright (C) 2017-2021 Free Software Foundation, Inc. diff --git a/test/lisp/eshell/em-ls-tests.el b/test/lisp/eshell/em-ls-tests.el index fc2cd9c8e14..5d1742b76fd 100644 --- a/test/lisp/eshell/em-ls-tests.el +++ b/test/lisp/eshell/em-ls-tests.el @@ -1,4 +1,4 @@ -;;; tests/em-ls-tests.el --- em-ls test suite -*- lexical-binding:t -*- +;;; em-ls-tests.el --- em-ls test suite -*- lexical-binding:t -*- ;; Copyright (C) 2017-2021 Free Software Foundation, Inc. diff --git a/test/lisp/eshell/esh-opt-tests.el b/test/lisp/eshell/esh-opt-tests.el index 0c99da64b2e..e2a0ea59d1c 100644 --- a/test/lisp/eshell/esh-opt-tests.el +++ b/test/lisp/eshell/esh-opt-tests.el @@ -1,4 +1,4 @@ -;;; tests/esh-opt-tests.el --- esh-opt test suite -*- lexical-binding:t -*- +;;; esh-opt-tests.el --- esh-opt test suite -*- lexical-binding:t -*- ;; Copyright (C) 2018-2021 Free Software Foundation, Inc. diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el index 4dac7024f41..4f0cc9b6785 100644 --- a/test/lisp/eshell/eshell-tests.el +++ b/test/lisp/eshell/eshell-tests.el @@ -1,4 +1,4 @@ -;;; tests/eshell-tests.el --- Eshell test suite -*- lexical-binding:t -*- +;;; eshell-tests.el --- Eshell test suite -*- lexical-binding:t -*- ;; Copyright (C) 1999-2021 Free Software Foundation, Inc. diff --git a/test/lisp/gnus/message-tests.el b/test/lisp/gnus/message-tests.el index 8650053b682..36ec8c51d15 100644 --- a/test/lisp/gnus/message-tests.el +++ b/test/lisp/gnus/message-tests.el @@ -1,4 +1,4 @@ -;;; message-mode-tests.el --- Tests for message-mode -*- lexical-binding: t; -*- +;;; message-tests.el --- Tests for message-mode -*- lexical-binding: t; -*- ;; Copyright (C) 2015-2021 Free Software Foundation, Inc. diff --git a/test/lisp/info-xref-tests.el b/test/lisp/info-xref-tests.el index 95af21fb591..ecba86146f1 100644 --- a/test/lisp/info-xref-tests.el +++ b/test/lisp/info-xref-tests.el @@ -1,4 +1,4 @@ -;;; info-xref.el --- tests for info-xref.el -*- lexical-binding:t -*- +;;; info-xref-tests.el --- tests for info-xref.el -*- lexical-binding:t -*- ;; Copyright (C) 2013-2021 Free Software Foundation, Inc. diff --git a/test/lisp/international/ucs-normalize-tests.el b/test/lisp/international/ucs-normalize-tests.el index a2da73767bc..51f4ed3a80e 100644 --- a/test/lisp/international/ucs-normalize-tests.el +++ b/test/lisp/international/ucs-normalize-tests.el @@ -1,4 +1,4 @@ -;;; ucs-normalize --- tests for international/ucs-normalize.el -*- lexical-binding: t -*- +;;; ucs-normalize-tests.el --- tests for international/ucs-normalize.el -*- lexical-binding: t -*- ;; Copyright (C) 2002-2021 Free Software Foundation, Inc. diff --git a/test/lisp/net/nsm-tests.el b/test/lisp/net/nsm-tests.el index ff453319b37..1a35ec34cb9 100644 --- a/test/lisp/net/nsm-tests.el +++ b/test/lisp/net/nsm-tests.el @@ -1,4 +1,4 @@ -;;; network-stream-tests.el --- tests for network security manager -*- lexical-binding: t; -*- +;;; nsm-tests.el --- tests for network security manager -*- lexical-binding: t; -*- ;; Copyright (C) 2019-2021 Free Software Foundation, Inc. diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el index a06e31a4f88..ed532af657a 100644 --- a/test/lisp/net/shr-tests.el +++ b/test/lisp/net/shr-tests.el @@ -1,4 +1,4 @@ -;;; network-stream-tests.el --- tests for network processes -*- lexical-binding: t; -*- +;;; shr-tests.el --- tests for shr.el -*- lexical-binding: t; -*- ;; Copyright (C) 2016-2021 Free Software Foundation, Inc. diff --git a/test/lisp/play/cookie1-tests.el b/test/lisp/play/cookie1-tests.el index d63ecb972aa..75dea4e5ef0 100644 --- a/test/lisp/play/cookie1-tests.el +++ b/test/lisp/play/cookie1-tests.el @@ -1,4 +1,4 @@ -;;; fortune-tests.el --- Tests for fortune.el -*- lexical-binding: t -*- +;;; cookie1-tests.el --- Tests for cookie1.el -*- lexical-binding: t -*- ;; Copyright (C) 2021 Free Software Foundation, Inc. diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 14bc48b92fd..107b359dc32 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -1,4 +1,4 @@ -;;; cperl-mode-tests --- Test for cperl-mode -*- lexical-binding: t -*- +;;; cperl-mode-tests.el --- Test for cperl-mode -*- lexical-binding: t -*- ;; Copyright (C) 2020-2021 Free Software Foundation, Inc. diff --git a/test/lisp/progmodes/perl-mode-tests.el b/test/lisp/progmodes/perl-mode-tests.el index 9f6800ccd63..f63f8ad7253 100644 --- a/test/lisp/progmodes/perl-mode-tests.el +++ b/test/lisp/progmodes/perl-mode-tests.el @@ -1,4 +1,4 @@ -;;; perl-mode-tests --- Test for perl-mode -*- lexical-binding: t -*- +;;; perl-mode-tests.el --- Test for perl-mode -*- lexical-binding: t -*- ;; Copyright (C) 2020-2021 Free Software Foundation, Inc. diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 601eca6cd49..4b153d117f0 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -1,4 +1,4 @@ -;;; simple-test.el --- Tests for simple.el -*- lexical-binding: t; -*- +;;; simple-tests.el --- Tests for simple.el -*- lexical-binding: t; -*- ;; Copyright (C) 2015-2021 Free Software Foundation, Inc. diff --git a/test/lisp/textmodes/fill-tests.el b/test/lisp/textmodes/fill-tests.el index 21efe620999..a4c7f447b59 100644 --- a/test/lisp/textmodes/fill-tests.el +++ b/test/lisp/textmodes/fill-tests.el @@ -1,4 +1,4 @@ -;;; fill-test.el --- ERT tests for fill.el -*- lexical-binding: t -*- +;;; fill-tests.el --- ERT tests for fill.el -*- lexical-binding: t -*- ;; Copyright (C) 2017-2021 Free Software Foundation, Inc. diff --git a/test/lisp/textmodes/tildify-tests.el b/test/lisp/textmodes/tildify-tests.el index 59c23943304..3ee3cd6fb17 100644 --- a/test/lisp/textmodes/tildify-tests.el +++ b/test/lisp/textmodes/tildify-tests.el @@ -1,4 +1,4 @@ -;;; tildify-test.el --- ERT tests for tildify.el -*- lexical-binding: t -*- +;;; tildify-tests.el --- ERT tests for tildify.el -*- lexical-binding: t -*- ;; Copyright (C) 2014-2021 Free Software Foundation, Inc. diff --git a/test/lisp/thingatpt-tests.el b/test/lisp/thingatpt-tests.el index 62a27f09cbd..07eb8bb250e 100644 --- a/test/lisp/thingatpt-tests.el +++ b/test/lisp/thingatpt-tests.el @@ -1,4 +1,4 @@ -;;; thingatpt.el --- tests for thing-at-point. -*- lexical-binding:t -*- +;;; thingatpt-tests.el --- tests for thing-at-point. -*- lexical-binding:t -*- ;; Copyright (C) 2013-2021 Free Software Foundation, Inc. diff --git a/test/lisp/vc/vc-bzr-tests.el b/test/lisp/vc/vc-bzr-tests.el index aeab51ec261..b02dce8f707 100644 --- a/test/lisp/vc/vc-bzr-tests.el +++ b/test/lisp/vc/vc-bzr-tests.el @@ -1,4 +1,4 @@ -;;; vc-bzr.el --- tests for vc/vc-bzr.el -*- lexical-binding: t -*- +;;; vc-bzr-tests.el --- tests for vc/vc-bzr.el -*- lexical-binding: t -*- ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. diff --git a/test/lisp/xml-tests.el b/test/lisp/xml-tests.el index cd3e1138f4b..b00b58acfc5 100644 --- a/test/lisp/xml-tests.el +++ b/test/lisp/xml-tests.el @@ -1,4 +1,4 @@ -;;; xml-parse-tests.el --- Test suite for XML parsing. -*- lexical-binding:t -*- +;;; xml-tests.el --- Test suite for XML parsing. -*- lexical-binding:t -*- ;; Copyright (C) 2012-2021 Free Software Foundation, Inc. diff --git a/test/manual/cedet/semantic-tests.el b/test/manual/cedet/semantic-tests.el index 7169c78bea0..1561c18dd68 100644 --- a/test/manual/cedet/semantic-tests.el +++ b/test/manual/cedet/semantic-tests.el @@ -1,4 +1,4 @@ -;;; semantic-utest.el --- Miscellaneous Semantic tests. -*- lexical-binding: t; -*- +;;; semantic-tests.el --- Miscellaneous Semantic tests. -*- lexical-binding: t; -*- ;; Copyright (C) 2003-2021 Free Software Foundation, Inc. diff --git a/test/manual/image-size-tests.el b/test/manual/image-size-tests.el index f7c2bf7fc0d..44846a7a67a 100644 --- a/test/manual/image-size-tests.el +++ b/test/manual/image-size-tests.el @@ -1,4 +1,4 @@ -;;; image-size-tests.el -- tests for image scaling -*- lexical-binding: t; -*- +;;; image-size-tests.el --- tests for image scaling -*- lexical-binding: t; -*- ;; Copyright (C) 2017-2021 Free Software Foundation, Inc. diff --git a/test/manual/image-transforms-tests.el b/test/manual/image-transforms-tests.el index 5342b5edcae..debb74f2edb 100644 --- a/test/manual/image-transforms-tests.el +++ b/test/manual/image-transforms-tests.el @@ -1,4 +1,4 @@ -;;; image-transform-tests.el --- Test suite for image transforms. -*- lexical-binding: t -*- +;;; image-transforms-tests.el --- Test suite for image transforms. -*- lexical-binding: t -*- ;; Copyright (C) 2019-2021 Free Software Foundation, Inc. diff --git a/test/manual/scroll-tests.el b/test/manual/scroll-tests.el index 2f40b2bb696..dd15d54fa88 100644 --- a/test/manual/scroll-tests.el +++ b/test/manual/scroll-tests.el @@ -1,4 +1,4 @@ -;;; scroll-tests.el -- tests for scrolling -*- lexical-binding: t -*- +;;; scroll-tests.el --- tests for scrolling -*- lexical-binding: t -*- ;; Copyright (C) 2017-2021 Free Software Foundation, Inc. diff --git a/test/misc/test-custom-noloads.el b/test/misc/test-custom-noloads.el index 6fa6a6c90d7..5e95e7d7740 100644 --- a/test/misc/test-custom-noloads.el +++ b/test/misc/test-custom-noloads.el @@ -1,4 +1,4 @@ -;;; test-custom-deps.el --- Test custom noloads -*- lexical-binding:t -*- +;;; test-custom-noloads.el --- Test custom noloads -*- lexical-binding:t -*- ;; Copyright (C) 2021 Free Software Foundation, Inc. @@ -42,4 +42,4 @@ (cus-test-noloads) (should-not cus-test-vars-not-cus-loaded)) -;;; test-custom-deps.el ends here +;;; test-custom-noloads.el ends here diff --git a/test/src/character-tests.el b/test/src/character-tests.el index 10fc4dbf353..f630b32a5ee 100644 --- a/test/src/character-tests.el +++ b/test/src/character-tests.el @@ -1,4 +1,4 @@ -;;; character-tests.el -- tests for character.c -*- lexical-binding:t -*- +;;; character-tests.el --- tests for character.c -*- lexical-binding:t -*- ;; Copyright (C) 2021 Free Software Foundation, Inc. diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index ea80da4819c..a731a95ccf0 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -1,4 +1,4 @@ -;;; editfns-tests.el -- tests for editfns.c -*- lexical-binding:t -*- +;;; editfns-tests.el --- tests for editfns.c -*- lexical-binding:t -*- ;; Copyright (C) 2016-2021 Free Software Foundation, Inc. diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index af5bc2a0baf..0a68d51e3eb 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -1,4 +1,4 @@ -;;; emacs-module-tests --- Test GNU Emacs modules. -*- lexical-binding: t; -*- +;;; emacs-module-tests.el --- Test GNU Emacs modules. -*- lexical-binding: t; -*- ;; Copyright 2015-2021 Free Software Foundation, Inc. diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index 7f193d4eeab..b989c97fe6b 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el @@ -1,4 +1,4 @@ -;;; unit tests for src/fileio.c -*- lexical-binding: t; -*- +;;; fileio-tests.el --- unit tests for src/fileio.c -*- lexical-binding: t; -*- ;; Copyright 2017-2021 Free Software Foundation, Inc. diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el index 0e1ca76fd9c..fc7bc7441b7 100644 --- a/test/src/thread-tests.el +++ b/test/src/thread-tests.el @@ -1,4 +1,4 @@ -;;; threads.el --- tests for threads. -*- lexical-binding: t -*- +;;; thread-tests.el --- tests for threads. -*- lexical-binding: t -*- ;; Copyright (C) 2012-2021 Free Software Foundation, Inc. diff --git a/test/src/timefns-tests.el b/test/src/timefns-tests.el index e55bd1eb4ee..0a450a7573f 100644 --- a/test/src/timefns-tests.el +++ b/test/src/timefns-tests.el @@ -1,4 +1,4 @@ -;;; timefns-tests.el -- tests for timefns.c -*- lexical-binding: t -*- +;;; timefns-tests.el --- tests for timefns.c -*- lexical-binding: t -*- ;; Copyright (C) 2016-2021 Free Software Foundation, Inc. -- cgit v1.2.3 From c4c9a60c1397f01f749e4aa3da8b85ad0bab20b6 Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Tue, 20 Apr 2021 00:25:39 +0200 Subject: cperl-mode: Avoid abbrev expansion in variable names * lisp/progmodes/cperl-mode.el (cperl-electric-else): Don't expand scalar variables like '$continue' as keywords. (Bug#47902) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-hyperactive-electric-else): Verify that keywords are expanded but variable names aren't. --- lisp/progmodes/cperl-mode.el | 2 +- test/lisp/progmodes/cperl-mode-tests.el | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 7878e91096c..bff3e60e90e 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -2224,7 +2224,7 @@ Help message may be switched off by setting `cperl-message-electric-keyword' to nil." (let ((beg (point-at-bol))) (and (save-excursion - (backward-sexp 1) + (skip-chars-backward "[:alpha:]") (cperl-after-expr-p nil "{;:")) (save-excursion (not diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 107b359dc32..9867aa884c6 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -495,4 +495,33 @@ as that quote like operator." 'font-lock-constant-face font-lock-string-face)))))) +(ert-deftest cperl-test-hyperactive-electric-else () + "Demonstrate cperl-electric-else behavior. +If `cperl-electric-keywords' is true, keywords like \"else\" and +\"continue\" are expanded by a following empty block, with the +cursor in the appropriate position to write that block. This, +however, must not happen when the keyword occurs in a variable +\"$else\" or \"$continue\"." + (skip-unless (eq cperl-test-mode #'cperl-mode)) + ;; `self-insert-command' takes a second argument only since Emacs 27 + (skip-unless (not (< emacs-major-version 27))) + (with-temp-buffer + (setq cperl-electric-keywords t) + (cperl-mode) + (insert "continue") + (self-insert-command 1 ?\ ) + (indent-region (point-min) (point-max)) + (goto-char (point-min)) + ;; cperl-mode creates a block here + (should (search-forward-regexp "continue {\n[[:blank:]]+\n}"))) + (with-temp-buffer + (setq cperl-electric-keywords t) + (cperl-mode) + (insert "$continue") + (self-insert-command 1 ?\ ) + (indent-region (point-min) (point-max)) + (goto-char (point-min)) + ;; No block should have been created here + (should-not (search-forward-regexp "{" nil t)))) + ;;; cperl-mode-tests.el ends here -- cgit v1.2.3 From 9e0fc5321b6be3b9242f2668a37a95057b4d1e0b Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Thu, 6 May 2021 12:33:40 +0200 Subject: cperl-mode: Eliminate bad interpretation of ?foo? * lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Delete ?? from the allowed bare regexp delimiters. (cperl-short-docs): Delete ?...? from the documentation. * test/lisp/progmodes/cperl-mode-tests.el (cperl-bug-47598): Add tests for good, bad, and ambiguous use of ? as regex delimiter (bug#47598). --- lisp/progmodes/cperl-mode.el | 16 ++++++---------- test/lisp/progmodes/cperl-mode-tests.el | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index bff3e60e90e..fa384bcad68 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3585,7 +3585,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', "\\<\\(q[wxqr]?\\|[msy]\\|tr\\)\\>" ; QUOTED CONSTRUCT "\\|" ;; 1+6+2+1=10 extra () before this: - "\\([?/<]\\)" ; /blah/ or ?blah? or + "\\([/<]\\)" ; /blah/ or "\\|" ;; 1+6+2+1+1=11 extra () before this "\\<" cperl-sub-regexp "\\>" ; sub with proto/attr @@ -3920,7 +3920,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', ;; 1+6+2=9 extra () before this: ;; "\\<\\(q[wxqr]?\\|[msy]\\|tr\\)\\>" ;; "\\|" - ;; "\\([?/<]\\)" ; /blah/ or ?blah? or + ;; "\\([/<]\\)" ; /blah/ or (setq b1 (if (match-beginning 10) 10 11) argument (buffer-substring (match-beginning b1) (match-end b1)) @@ -3958,7 +3958,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (goto-char (match-beginning b1)) (cperl-backward-to-noncomment (point-min)) (or bb - (if (eq b1 11) ; bare /blah/ or ?blah? or + (if (eq b1 11) ; bare /blah/ or (setq argument "" b1 nil bb ; Not a regexp? @@ -3966,7 +3966,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', ;; What is below: regexp-p? (and (or (memq (preceding-char) - (append (if (memq c '(?\? ?\<)) + (append (if (char-equal c ?\<) ;; $a++ ? 1 : 2 "~{(=|&*!,;:[" "~{(=|&+-*!,;:[") nil)) @@ -3977,14 +3977,11 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (forward-sexp -1) ;; After these keywords `/' starts a RE. One should add all the ;; functions/builtins which expect an argument, but ... - (if (eq (preceding-char) ?-) - ;; -d ?foo? is a RE - (looking-at "[a-zA-Z]\\>") (and (not (memq (preceding-char) '(?$ ?@ ?& ?%))) (looking-at - "\\(while\\|if\\|unless\\|until\\|and\\|or\\|not\\|xor\\|split\\|grep\\|map\\|print\\|say\\|return\\)\\>"))))) + "\\(while\\|if\\|unless\\|until\\|and\\|or\\|not\\|xor\\|split\\|grep\\|map\\|print\\|say\\|return\\)\\>")))) (and (eq (preceding-char) ?.) (eq (char-after (- (point) 2)) ?.)) (bobp)) @@ -7232,8 +7229,7 @@ $~ The name of the current report format. ... >= ... Numeric greater than or equal to. ... >> ... Bitwise shift right. ... >>= ... Bitwise shift right assignment. -... ? ... : ... Condition=if-then-else operator. ?PAT? One-time pattern match. -?PATTERN? One-time pattern match. +... ? ... : ... Condition=if-then-else operator. @ARGV Command line arguments (not including the command name - see $0). @INC List of places to look for perl scripts during do/include/use. @_ Parameter array for subroutines; result of split() unless in list context. diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 9867aa884c6..7cdfa45d6f7 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -524,4 +524,31 @@ however, must not happen when the keyword occurs in a variable ;; No block should have been created here (should-not (search-forward-regexp "{" nil t)))) +(ert-deftest cperl-test-bug-47598 () + "Check that a file test followed by ? is no longer interpreted +as a regex." + ;; Testing the text from the bug report + (with-temp-buffer + (insert "my $f = -f ? 'file'\n") + (insert " : -l ? [readlink]\n") + (insert " : -d ? 'dir'\n") + (insert " : 'unknown';\n") + (funcall cperl-test-mode) + ;; Perl mode doesn't highlight file tests as functions, so we + ;; can't test for the function's face. But we can verify that the + ;; function is not a string. + (goto-char (point-min)) + (search-forward "?") + (should-not (nth 3 (syntax-ppss (point))))) + ;; Testing the actual targets for the regexp: m?foo? (still valid) + ;; and ?foo? (invalid since Perl 5.22) + (with-temp-buffer + (insert "m?foo?;") + (funcall cperl-test-mode) + (should (nth 3 (syntax-ppss 3)))) + (with-temp-buffer + (insert " ?foo?;") + (funcall cperl-test-mode) + (should-not (nth 3 (syntax-ppss 3))))) + ;;; cperl-mode-tests.el ends here -- cgit v1.2.3 From 90f54aad5e978653f5a590cdfb68090a0f9a25fc Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Tue, 8 Jun 2021 23:23:25 +0200 Subject: ; perl-mode.el: Detect regexes immediately after "|&" * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Add "|&" to the list of characters after which a slash starts a regular expression (Bug#23992). * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-ppss): Correct the docstring. (cperl-test-bug-23992): New test for Bug#23992. (cperl-test-bug-42168): Adapt inline comments to the current code. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl: Resource file with example code from the bug report. --- lisp/progmodes/perl-mode.el | 2 +- .../cperl-mode-resources/cperl-bug-23992.pl | 10 ++++++++ test/lisp/progmodes/cperl-mode-tests.el | 30 ++++++++++++++++++---- 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index fd23683bc0a..d13c9053d57 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -285,7 +285,7 @@ (put-text-property (match-beginning 2) (match-end 2) 'syntax-table (string-to-syntax "\"")) (perl-syntax-propertize-special-constructs end))))) - ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" + ("\\(^\\|[?:.,;=|&!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" ;; Nasty cases: ;; /foo/m $a->m $#m $m @m %m ;; \s (appears often in regexps). diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl new file mode 100644 index 00000000000..1db639c6aa2 --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl @@ -0,0 +1,10 @@ +# Test file for Bug#23992 +# +# The "||" case is directly from the report, +# the "&&" case has been added for symmetry. + +s/LEFT/L/g || s/RIGHT/R/g || s/aVALUE\D+//g; +s/LEFT/L/g||s/RIGHT/R/g||s/aVALUE\D+//g; + +s/LEFT/L/g && s/RIGHT/R/g && s/aVALUE\D+//g; +s/LEFT/L/g&&s/RIGHT/R/g&&s/aVALUE\D+//g; diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 7cdfa45d6f7..036e20d7cca 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -37,7 +37,7 @@ ;;; Utilities (defun cperl-test-ppss (text regexp) - "Return the `syntax-ppss' of the first character matched by REGEXP in TEXT." + "Return the `syntax-ppss' after the last character matched by REGEXP in TEXT." (interactive) (with-temp-buffer (insert text) @@ -377,6 +377,26 @@ documentation it does the right thing anyway." (cperl-indent-command) (forward-line 1)))) +(ert-deftest cperl-test-bug-23992 () + "Verify that substitutions are fontified directly after \"|&\". +Regular expressions are strings in both perl-mode and cperl-mode." + (with-temp-buffer + (insert-file-contents (ert-resource-file "cperl-bug-23992.pl")) + (funcall cperl-test-mode) + (goto-char (point-min)) + ;; "or" operator, with spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))) + ;; "or" operator, without spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))) + ;; "and" operator, with spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))) + ;; "and" operator, without spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))))) + (ert-deftest cperl-test-bug-28650 () "Verify that regular expressions are recognized after 'return'. The test uses the syntax property \"inside a string\" for the @@ -448,14 +468,14 @@ If seen as regular expression, then the slash is displayed using font-lock-constant-face. If seen as a division, then it doesn't have a face property." :tags '(:fontification) - ;; The next two Perl expressions have divisions. Perl "punctuation" - ;; operators don't get a face. + ;; The next two Perl expressions have divisions. The slash does not + ;; start a string. (let ((code "{ $a++ / $b }")) (should (equal (nth 8 (cperl-test-ppss code "/")) nil))) (let ((code "{ $a-- / $b }")) (should (equal (nth 8 (cperl-test-ppss code "/")) nil))) - ;; The next two Perl expressions have regular expressions. The - ;; delimiter of a RE is fontified with font-lock-constant-face. + ;; The next two Perl expressions have regular expressions. The slash + ;; starts a string. (let ((code "{ $a+ / $b } # /")) (should (equal (nth 8 (cperl-test-ppss code "/")) 7))) (let ((code "{ $a- / $b } # /")) -- cgit v1.2.3 From dd9385b404c28a155a91960a4f1c4c77fdc5413d Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Wed, 9 Jun 2021 22:58:53 +0200 Subject: ; perl-mode.el: Detect quote-like operator immediately after => * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Detect a quotelike operator immediately after a fat comma "=>" (Bug#25098) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-25098): Test case for the bug with code from the bug report. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-25098.pl: Resource file for the test. --- lisp/progmodes/perl-mode.el | 2 +- .../cperl-mode-resources/cperl-bug-25098.pl | 21 +++++++++++++++++++++ test/lisp/progmodes/cperl-mode-tests.el | 18 ++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 test/lisp/progmodes/cperl-mode-resources/cperl-bug-25098.pl (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index d13c9053d57..a20887621e8 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -285,7 +285,7 @@ (put-text-property (match-beginning 2) (match-end 2) 'syntax-table (string-to-syntax "\"")) (perl-syntax-propertize-special-constructs end))))) - ("\\(^\\|[?:.,;=|&!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" + ("\\(^\\|[?:.,;=|&!~({[ \t]\\|=>\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" ;; Nasty cases: ;; /foo/m $a->m $#m $m @m %m ;; \s (appears often in regexps). diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-25098.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-25098.pl new file mode 100644 index 00000000000..0987b4e02c0 --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-25098.pl @@ -0,0 +1,21 @@ +# Code from the bug report Bug#25098 + +my $good = XML::LibXML->load_xml( string => q{
}); +my $bad = XML::LibXML->load_xml( string =>q{
}); + +# Related: Method calls are no quotelike operators. That's why you +# can't just add '>' to the character class. + +my $method_call = $object->q(argument); + +# Also related, still not fontified correctly: +# +# my $method_call = $object -> q (argument); +# +# perl-mode interprets the method call as a quotelike op (because it +# is preceded by a space). +# cperl-mode gets the argument right, but marks q as a quotelike op. +# +# my $greater = 2>q/1/; +# +# perl-mode doesn't identify this as a quotelike op. diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 036e20d7cca..dcf4f398c29 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -397,6 +397,24 @@ Regular expressions are strings in both perl-mode and cperl-mode." (search-forward "RIGHT") (should (nth 3 (syntax-ppss))))) +(ert-deftest cperl-test-bug-25098 () + "Verify that a quotelike operator is recognized after a fat comma \"=>\". +Related, check that calling a method named q is not mistaken as a +quotelike operator." + (with-temp-buffer + (insert-file-contents (ert-resource-file "cperl-bug-25098.pl")) + (funcall cperl-test-mode) + (goto-char (point-min)) + ;; good example from the bug report, with a space + (search-forward "q{") + (should (nth 3 (syntax-ppss))) + ;; bad (but now fixed) example from the bug report, without space + (search-forward "q{") + (should (nth 3 (syntax-ppss))) + ;; calling a method "q" (parens instead of braces to make it valid) + (search-forward "q(") + (should-not (nth 3 (syntax-ppss))))) + (ert-deftest cperl-test-bug-28650 () "Verify that regular expressions are recognized after 'return'. The test uses the syntax property \"inside a string\" for the -- cgit v1.2.3 From 87bd14ca8bdecda6964aeb3c323faee846a8c1b8 Mon Sep 17 00:00:00 2001 From: Harald Jörg Date: Fri, 11 Jun 2021 13:52:45 +0200 Subject: ; perl-mode.el: Allow newline between quote-likes and delimiter * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Allow newline between a quote-like operator and its delimiter (Bug#22355). * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-22355): Test case for the fix. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl: Test resource for a quote-like with newline before the delimiter. --- lisp/progmodes/perl-mode.el | 2 +- .../lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl | 14 ++++++++++++++ test/lisp/progmodes/cperl-mode-tests.el | 11 +++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl (limited to 'test/lisp/progmodes/cperl-mode-tests.el') diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index a20887621e8..f49ee4cb2b5 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -285,7 +285,7 @@ (put-text-property (match-beginning 2) (match-end 2) 'syntax-table (string-to-syntax "\"")) (perl-syntax-propertize-special-constructs end))))) - ("\\(^\\|[?:.,;=|&!~({[ \t]\\|=>\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" + ("\\(^\\|[?:.,;=|&!~({[ \t]\\|=>\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\(?:\\s-\\|\n\\)*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" ;; Nasty cases: ;; /foo/m $a->m $#m $m @m %m ;; \s (appears often in regexps). diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl new file mode 100644 index 00000000000..f54d55241df --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-22355.pl @@ -0,0 +1,14 @@ +# The source file contains non-ASCII characters, supposed to be saved +# in UTF-8 encoding. Tell Perl about that, just in case. +use utf8; + +# Following code is the example from the report Bug#22355 which needed +# attention in perl-mode. + +printf qq +{ + + + 台灣 %s 廣播電台 + +}, uc( substr( $ARGV[0], 0, 2 ) ), $year + 1900, $mon + 1, $mday; diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index dcf4f398c29..4d2bac6ee47 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -377,6 +377,17 @@ documentation it does the right thing anyway." (cperl-indent-command) (forward-line 1)))) +(ert-deftest cperl-test-bug-22355 () + "Verify that substitutions are fontified directly after \"|&\". +Regular expressions are strings in both perl-mode and cperl-mode." + (with-temp-buffer + (insert-file-contents (ert-resource-file "cperl-bug-22355.pl")) + (funcall cperl-test-mode) + (goto-char (point-min)) + ;; Just check for the start of the string + (search-forward "{") + (should (nth 3 (syntax-ppss))))) + (ert-deftest cperl-test-bug-23992 () "Verify that substitutions are fontified directly after \"|&\". Regular expressions are strings in both perl-mode and cperl-mode." -- cgit v1.2.3