.emacs.d

My Emacs configuration files.
Log | Files | Refs | README

commit 13b0a22c2651374cbab1b827afe218aec90c3966
parent 6efda0052077f655017c77c9f77f48dc3e70260d
Author: Hugo Soucy <hugo.soucy@toumoro.com>
Date:   Mon, 16 Sep 2019 21:40:32 -0400

Delete the styled component function

Diffstat:
Ddefuns/styled.el | 48------------------------------------------------
1 file changed, 0 insertions(+), 48 deletions(-)

diff --git a/defuns/styled.el b/defuns/styled.el @@ -1,48 +0,0 @@ -;;; styled.el --- Styled components for emacs. -*- lexical-binding: t; -*- - -;; Copyright (C) 2018 Eduardo V. - -;;; Commentary: - -;;; Code: - -(require 'css-mode) -(require 'fence-edit) -(require 'rx) -(require 'ov) - -(setq - styled-component-start - (rx-to-string '(: (1+ (and (+ word) (0+ "\.") (0+ "(" (+ alpha) ")"))) "`" eol))) - -(setq styled-component-end (rx-to-string '(: "`;" eol))) - -(setq - styled-component-region - (rx-to-string '(: (minimal-match - (seq - (and (1+ (and (+ word) (0+ "\.") (0+ "(" (+ alpha) ")"))) "`") - (or "\n" "\r") - (0+ (+ any) (or "\n" "\r")) - (and "`;" eol)))))) - -(setq fence-edit-blocks `((,styled-component-start ,styled-component-end))) -(setq fence-edit-default-mode 'css-mode) - -(defun styled/get-component () - "Get current buffer styled components." - (interactive) - (let (matches match beg end) - (save-match-data - (save-excursion - (goto-char (point-min)) - (while (search-forward-regexp styled-component-region nil t 1) - (setq match (match-string-no-properties 0)) - (setq beg (match-beginning 0)) - (setq end (match-end 0)) - (push (list beg end match) matches)) - )) - (reverse matches))) - -(provide 'styled) -;;; styled.el ends here