From 67f180d1bdee8686d6ebf7b94e813c63fe1dd431 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 26 Dec 2019 08:44:45 +0100 Subject: [PATCH] Emacs: Convert regular expressions to normal syntax. --- init/basics/buffers.el | 13 +++++++------ init/net/server.el | 12 ++++++------ init/programming/c++.el | 6 +++--- init/text/common.el | 8 ++++---- init/text/latex.el | 4 ++-- init/text/misc.el | 22 +++++++++++----------- init/text/tools.el | 4 ++-- init/text/web.el | 10 +++++----- 8 files changed, 40 insertions(+), 39 deletions(-) diff --git a/init/basics/buffers.el b/init/basics/buffers.el index e75ab19..abd254f 100644 --- a/init/basics/buffers.el +++ b/init/basics/buffers.el @@ -1,6 +1,6 @@ ;;; buffers.el --- Default settings for buffers. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-11-25T20:52:35+00:00> +;; Time-stamp: <2019-12-26T07:37:53+00:00> ;;; Commentary: ;; * Setup scratch buffer. @@ -64,11 +64,12 @@ :config (setq clean-buffer-list-kill-regexps ; Add these to special buffers. (nconc clean-buffer-list-kill-regexps - '("\\`magit-?.*:" - "\\.log\\'" - "\\`\\*rdm\\*\\'" - "\\`\\*Backtrace\\*\\'" - "\\`Pfuture-Callback"))) + '("^magit-?.*:" + "\\.log$" + "^\\*rdm\\*$" + "^\\*Backtrace\\*$" + "^Pfuture-Callback" + ))) (midnight-mode t) ) diff --git a/init/net/server.el b/init/net/server.el index 2f2c36d..6eeb8c9 100644 --- a/init/net/server.el +++ b/init/net/server.el @@ -1,6 +1,6 @@ ;;; server.el --- Set up network stuff.. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-11-04T19:43:41+00:00> +;; Time-stamp: <2019-12-26T07:39:57+00:00> ;;; Commentary: @@ -57,11 +57,11 @@ :custom (edit-server-url-major-mode-alist '( - ("\\`likeable\\.space/" . markdown-mode) - ("\\`schlomp\\.space/" . markdown-mode) - ("\\`wiki\\.gentoo\\.org/" . mediawiki-mode) - ("\\`github\\.com/" . markdown-mode) - ("\\`gitlab\\.com/" . markdown-mode) + ("^likeable\\.space/" . markdown-mode) + ("^schlomp\\.space/" . markdown-mode) + ("^wiki\\.gentoo\\.org/" . mediawiki-mode) + ("^github\\.com/" . markdown-mode) + ("^gitlab\\.com/" . markdown-mode) )) :config diff --git a/init/programming/c++.el b/init/programming/c++.el index e4968c8..d8e5865 100644 --- a/init/programming/c++.el +++ b/init/programming/c++.el @@ -1,6 +1,6 @@ ;;; c++.el --- C++ settings. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-12-19T18:21:05+00:00> +;; Time-stamp: <2019-12-26T07:40:19+00:00> ;;; Commentary: @@ -139,8 +139,8 @@ :unless (string-match-p "gentoo" operating-system-release) :mode - ("CMakeLists\\.txt\\'" . cmake-mode) - ("\\.cmake\\'" . cmake-mode) + ("CMakeLists\\.txt$" . cmake-mode) + ("\\.cmake$" . cmake-mode) ) ;; CMake reference. diff --git a/init/text/common.el b/init/text/common.el index 2d05cd5..cd18c86 100644 --- a/init/text/common.el +++ b/init/text/common.el @@ -161,16 +161,16 @@ :config (add-to-list 'auto-insert-alist - '(("\\.\\(cpp\\|cc\\|cxx\\|c\\+\\+\\)\\'" . "C++ program") . + '(("\\.\\(cpp\\|cc\\|cxx\\|c\\+\\+\\)$" . "C++ program") . ["cpp" my/autoinsert-yas-expand])) (add-to-list 'auto-insert-alist - '(("\\.\\(hpp\\|hh\\|hxx\\|h\\+\\+\\)\\'" . "C++ header") . + '(("\\.\\(hpp\\|hh\\|hxx\\|h\\+\\+\\)$" . "C++ header") . ["hpp" my/autoinsert-yas-expand])) (add-to-list 'auto-insert-alist - '(("\\.[1-9]\\.adoc\\'" . "AsciiDoc manpage") . + '(("\\.[1-9]\\.adoc$" . "AsciiDoc manpage") . ["manpage.adoc" my/autoinsert-yas-expand])) (add-to-list 'auto-insert-alist - '(("\\.user.js\\'" . "Userscript") . + '(("\\.user.js$" . "Userscript") . ["user.js" my/autoinsert-yas-expand])) :hook diff --git a/init/text/latex.el b/init/text/latex.el index 37cebc3..b8d3dc5 100644 --- a/init/text/latex.el +++ b/init/text/latex.el @@ -1,6 +1,6 @@ ;;; latex.el --- Settings for LaTeX. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-11-14T23:33:19+00:00> +;; Time-stamp: <2019-12-26T07:41:35+00:00> ;;; Commentary: @@ -18,7 +18,7 @@ (TeX-engine 'xetex) :mode - ("\\.tex\\'" . LaTeX-mode) + ("\\.tex$" . LaTeX-mode) :config ;; To have the buffer refresh after compilation. diff --git a/init/text/misc.el b/init/text/misc.el index fb615b4..fbef58a 100644 --- a/init/text/misc.el +++ b/init/text/misc.el @@ -1,6 +1,6 @@ ;;; misc.el --- Miscellaneous file formats. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-12-19T00:36:29+00:00> +;; Time-stamp: <2019-12-26T07:43:33+00:00> ;;; Commentary: @@ -10,9 +10,9 @@ (use-package conf-mode :mode - ("\\`/etc/conf\\.d/" . conf-mode) ; openrc config files. - ("\\`/etc/portage/package\\.use/" . conf-space-mode) ; Portage config. - ("\\`/etc/portage/package\\.accept_keywords/" . conf-space-mode) + ("^/etc/conf\\.d/" . conf-mode) ; openrc config files. + ("^/etc/portage/package\\.use/" . conf-space-mode) ; Portage config. + ("^/etc/portage/package\\.accept_keywords/" . conf-space-mode) ("\\.pc\\(\\.in\\)?$" . conf-mode) ; pkg-config files. ("conanfile\\.txt$" . conf-mode) ; Conan recipes. ) @@ -24,7 +24,7 @@ :mode ("/cron\\.d/" . crontab-mode) - ("\\`'/etc/crontab\\'" . crontab-mode) + ("^'/etc/crontab$" . crontab-mode) :hook (crontab-mode . (lambda () (auto-fill-mode -1))) ; No word-wrapping. @@ -43,14 +43,14 @@ (use-package yaml-mode :mode - ("\\.yml\\'" . yaml-mode) + ("\\.yml$" . yaml-mode) ) (use-package mediawiki) (use-package csv-mode :mode - ("\\.[Cc][Ss][Vv]\\'" . csv-mode) + ("\\.[Cc][Ss][Vv]$" . csv-mode) ) (use-package adoc-mode @@ -79,7 +79,7 @@ (markup-verbatim-face ((t (:background "gray5")))) :mode - ("\\.adoc\\'" . adoc-mode) + ("\\.adoc$" . adoc-mode) :hook (adoc-mode . auto-fill-mode) ; Wrap at fill-column. @@ -113,9 +113,9 @@ :weight bold)))) :mode - (("README\\.md\\'" . gfm-mode) - ("\\.md\\'" . markdown-mode) - ("\\.markdown\\'" . markdown-mode)) + (("README\\.md$" . gfm-mode) + ("\\.md$" . markdown-mode) + ("\\.markdown$" . markdown-mode)) :hook (markdown-mode . auto-fill-mode) ; Wrap at fill-column. diff --git a/init/text/tools.el b/init/text/tools.el index 3730c90..d7e2ec6 100644 --- a/init/text/tools.el +++ b/init/text/tools.el @@ -1,6 +1,6 @@ ;;; tools.el --- Configure text tools. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-11-24T18:25:06+00:00> +;; Time-stamp: <2019-12-26T07:42:10+00:00> ;;; Commentary: @@ -32,7 +32,7 @@ ) ;; Open manpages in new window. - (setq display-buffer-alist '(("\\`\\*WoMan" display-buffer-pop-up-window))) + (setq display-buffer-alist '(("^\\*WoMan" display-buffer-pop-up-window))) :bind ("C-" . my/woman-topic-at-point) ) diff --git a/init/text/web.el b/init/text/web.el index 8692b02..cdf770d 100644 --- a/init/text/web.el +++ b/init/text/web.el @@ -1,6 +1,6 @@ ;;; web.el --- Settings for web stuff. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-10-14T15:23:46+00:00> +;; Time-stamp: <2019-12-26T07:41:59+00:00> ;;; Commentary: @@ -16,9 +16,9 @@ (use-package web-mode :mode - ("\\.p?html?\\'" . web-mode) - ("\\.tmpl\\'" . web-mode) ; Gitea templates. - ("\\.php\\'" . web-mode) + ("\\.p?html?$" . web-mode) + ("\\.tmpl$" . web-mode) ; Gitea templates. + ("\\.php$" . web-mode) :hook (web-mode . (lambda () (set-fill-column 100))) @@ -35,7 +35,7 @@ :height 1.4)))) :mode - ("\\.epub\\'" . nov-mode) + ("\\.epub$" . nov-mode) ) (provide 'text/web)