From ae4133cda70f515a2d2930dd7e29bcd92ad7d058 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Mon, 10 Jan 2022 20:42:06 +0100 Subject: Update markdown-mode and yaml-mode --- .emacs.d/lisp/yaml-mode.el | 56 ++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 29 deletions(-) (limited to '.emacs.d/lisp/yaml-mode.el') diff --git a/.emacs.d/lisp/yaml-mode.el b/.emacs.d/lisp/yaml-mode.el index 9d619d5..666f128 100644 --- a/.emacs.d/lisp/yaml-mode.el +++ b/.emacs.d/lisp/yaml-mode.el @@ -1,4 +1,4 @@ -;;; yaml-mode.el --- Major mode for editing YAML files +;;; yaml-mode.el --- Major mode for editing YAML files -*- lexical-binding: t -*- ;; Copyright (C) 2010-2014 Yoshiki Kurihara @@ -12,19 +12,18 @@ ;; This file is not part of Emacs -;; This file is free software; you can redistribute it and/or modify +;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. -;; This file is distributed in the hope that it will be useful, +;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; You should have received a copy of the GNU General Public License along -;; with this program; if not, write to the Free Software Foundation, Inc., -;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . ;;; Commentary: @@ -103,8 +102,8 @@ that key is pressed to begin a block literal." :group 'yaml) (defface yaml-tab-face - '((((class color)) (:background "red" :foreground "red" :bold t)) - (t (:reverse-video t))) + '((((class color)) (:background "red" :foreground "red" :bold t)) + (t (:reverse-video t))) "Face to use for highlighting tabs in YAML files." :group 'faces :group 'yaml) @@ -243,7 +242,7 @@ that key is pressed to begin a block literal." (,yaml-document-delimiter-re . (0 font-lock-comment-face)) (,yaml-directive-re . (1 font-lock-builtin-face)) ("^[\t]+" 0 'yaml-tab-face t)) - "Additional expressions to highlight in YAML mode.") + "Additional expressions to highlight in YAML mode.") (defun yaml-mode-syntax-propertize-function (beg end) "Override buffer's syntax table for special syntactic constructs." @@ -367,7 +366,6 @@ back-dent the line by `yaml-indent-offset' spaces. On reaching column 0, it will cycle back to the maximum sensible indentation." (interactive "*") (let ((ci (current-indentation)) - (cc (current-column)) (need (yaml-compute-indentation))) (save-excursion (beginning-of-line) @@ -432,27 +430,27 @@ otherwise do nothing." (while (and (looking-at-p yaml-blank-line-re) (not (bobp))) (forward-line -1)) (let ((nlines yaml-block-literal-search-lines) - (min-level (current-indentation)) - beg) + (min-level (current-indentation)) + beg) (forward-line -1) (while (and (/= nlines 0) - (/= min-level 0) - (not (looking-at-p yaml-block-literal-re)) - (not (bobp))) - (setq nlines (1- nlines)) - (unless (looking-at-p yaml-blank-line-re) - (setq min-level (min min-level (current-indentation)))) - (forward-line -1)) + (/= min-level 0) + (not (looking-at-p yaml-block-literal-re)) + (not (bobp))) + (setq nlines (1- nlines)) + (unless (looking-at-p yaml-blank-line-re) + (setq min-level (min min-level (current-indentation)))) + (forward-line -1)) (when (and (< (current-indentation) min-level) (looking-at-p yaml-block-literal-re)) - (setq min-level (current-indentation)) - (forward-line) - (setq beg (point)) - (while (and (not (eobp)) - (or (looking-at-p yaml-blank-line-re) - (> (current-indentation) min-level))) - (forward-line)) - (narrow-to-region beg (point)))))) + (setq min-level (current-indentation)) + (forward-line) + (setq beg (point)) + (while (and (not (eobp)) + (or (looking-at-p yaml-blank-line-re) + (> (current-indentation) min-level))) + (forward-line)) + (narrow-to-region beg (point)))))) (defun yaml-fill-paragraph (&optional justify region) "Fill paragraph. -- cgit v1.3