From cc478f073e6323c95d5312f8848a3425a2998726 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Thu, 31 Oct 2019 16:42:29 +0100 Subject: [PATCH] update smartparens --- bba.org | 2 +- .../smartparens-autoloads.el | 150 ++---------------- .../smartparens-c.el | 52 ++++++ .../smartparens-clojure.el | 2 +- .../smartparens-config.el | 3 + .../smartparens-crystal.el | 0 .../smartparens-elixir.el | 0 .../smartparens-ess.el | 0 .../smartparens-haskell.el | 0 .../smartparens-html.el | 0 .../smartparens-javascript.el | 2 +- .../smartparens-latex.el | 4 +- .../smartparens-lua.el | 0 .../smartparens-markdown.el | 0 .../smartparens-ml.el | 3 + .../smartparens-org.el | 8 +- .../smartparens-pkg.el | 2 +- .../smartparens-python.el | 0 .../smartparens-racket.el | 0 .../smartparens-rst.el | 62 ++++++++ .../smartparens-ruby.el | 0 .../smartparens-rust.el | 0 .../smartparens-scala.el | 0 .../smartparens-text.el | 0 .../smartparens.el | 30 +++- 25 files changed, 168 insertions(+), 152 deletions(-) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-autoloads.el (56%) create mode 100644 elpa/smartparens-20191015.1754/smartparens-c.el rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-clojure.el (97%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-config.el (97%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-crystal.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-elixir.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-ess.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-haskell.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-html.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-javascript.el (97%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-latex.el (98%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-lua.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-markdown.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-ml.el (95%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-org.el (84%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-pkg.el (71%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-python.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-racket.el (100%) create mode 100644 elpa/smartparens-20191015.1754/smartparens-rst.el rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-ruby.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-rust.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-scala.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens-text.el (100%) rename elpa/{smartparens-20190112.1318 => smartparens-20191015.1754}/smartparens.el (99%) diff --git a/bba.org b/bba.org index 86c15dce..44c4e7bc 100644 --- a/bba.org +++ b/bba.org @@ -372,8 +372,8 @@ Some key bindings taken from [[https://ebzzry.github.io/emacs-pairs.html][emacs- #+BEGIN_SRC emacs-lisp :tangle yes (if (>= emacs-major-version 24) (progn - (add-to-list 'load-path "~/.emacs.d/elpa/smartparens-20190112.1318") (add-to-list 'load-path "~/.emacs.d/elpa/dash-20180910.1856") + (add-to-list 'load-path "~/.emacs.d/elpa/smartparens-20191015.1754") (require 'smartparens) (smartparens-global-mode 1) (defmacro def-pairs (pairs) diff --git a/elpa/smartparens-20190112.1318/smartparens-autoloads.el b/elpa/smartparens-20191015.1754/smartparens-autoloads.el similarity index 56% rename from elpa/smartparens-20190112.1318/smartparens-autoloads.el rename to elpa/smartparens-20191015.1754/smartparens-autoloads.el index 9247c718..45dddf4e 100644 --- a/elpa/smartparens-20190112.1318/smartparens-autoloads.el +++ b/elpa/smartparens-20191015.1754/smartparens-autoloads.el @@ -1,12 +1,10 @@ ;;; smartparens-autoloads.el --- automatically extracted autoloads ;; ;;; Code: - -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) - +(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) -;;;### (autoloads nil "smartparens" "smartparens.el" (0 0 0 0)) +;;;### (autoloads nil "smartparens" "smartparens.el" (23994 46378 +;;;;;; 816924 785000)) ;;; Generated autoloads from smartparens.el (autoload 'sp-cheat-sheet "smartparens" "\ @@ -183,140 +181,17 @@ Turn off `show-smartparens-mode'. \(fn)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens" '("smartparens-" "sp-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-clojure" "smartparens-clojure.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-clojure.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-clojure" '("sp-clojure-prefix"))) - -;;;*** - -;;;### (autoloads nil "smartparens-config" "smartparens-config.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-config.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-config" '("sp-lisp-invalid-hyperlink-p"))) - -;;;*** - -;;;### (autoloads nil "smartparens-crystal" "smartparens-crystal.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-crystal.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-crystal" '("sp-crystal-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-elixir" "smartparens-elixir.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-elixir.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-elixir" '("sp-elixir-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-ess" "smartparens-ess.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from smartparens-ess.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-ess" '("sp-ess-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-haskell" "smartparens-haskell.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-haskell.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-haskell" '("sp-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-html" "smartparens-html.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from smartparens-html.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-html" '("sp-html-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-latex" "smartparens-latex.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-latex.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-latex" '("sp-latex-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-lua" "smartparens-lua.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from smartparens-lua.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-lua" '("sp-lua-post-keyword-insert"))) - -;;;*** - -;;;### (autoloads nil "smartparens-markdown" "smartparens-markdown.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-markdown.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-markdown" '("sp-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-org" "smartparens-org.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from smartparens-org.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-org" '("sp--org-skip-asterisk"))) - -;;;*** - -;;;### (autoloads nil "smartparens-python" "smartparens-python.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-python.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-python" '("sp-python-fix-tripple-quotes"))) - -;;;*** - -;;;### (autoloads nil "smartparens-ruby" "smartparens-ruby.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from smartparens-ruby.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-ruby" '("sp-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-rust" "smartparens-rust.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from smartparens-rust.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-rust" '("sp-"))) - -;;;*** - -;;;### (autoloads nil "smartparens-scala" "smartparens-scala.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from smartparens-scala.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-scala" '("sp-scala-wrap-with-indented-newlines"))) - -;;;*** - -;;;### (autoloads nil "smartparens-text" "smartparens-text.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from smartparens-text.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-text" '("sp-text-mode-"))) - ;;;*** -;;;### (autoloads nil nil ("smartparens-javascript.el" "smartparens-ml.el" -;;;;;; "smartparens-pkg.el" "smartparens-racket.el") (0 0 0 0)) +;;;### (autoloads nil nil ("smartparens-c.el" "smartparens-clojure.el" +;;;;;; "smartparens-config.el" "smartparens-crystal.el" "smartparens-elixir.el" +;;;;;; "smartparens-ess.el" "smartparens-haskell.el" "smartparens-html.el" +;;;;;; "smartparens-javascript.el" "smartparens-latex.el" "smartparens-lua.el" +;;;;;; "smartparens-markdown.el" "smartparens-ml.el" "smartparens-org.el" +;;;;;; "smartparens-pkg.el" "smartparens-python.el" "smartparens-racket.el" +;;;;;; "smartparens-rst.el" "smartparens-ruby.el" "smartparens-rust.el" +;;;;;; "smartparens-scala.el" "smartparens-text.el") (23994 46378 +;;;;;; 828857 860000)) ;;;*** @@ -324,6 +199,5 @@ Turn off `show-smartparens-mode'. ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 ;; End: ;;; smartparens-autoloads.el ends here diff --git a/elpa/smartparens-20191015.1754/smartparens-c.el b/elpa/smartparens-20191015.1754/smartparens-c.el new file mode 100644 index 00000000..58216a83 --- /dev/null +++ b/elpa/smartparens-20191015.1754/smartparens-c.el @@ -0,0 +1,52 @@ +;;; smartparens-c.el --- Additional configuration for C/C++ mode. -*- lexical-binding: t; -*- +;; +;; Author: Naoya Yamashita +;; Maintainer: Matus Goljer +;; Created: 23 June 2019 +;; Keywords: abbrev convenience editing +;; URL: https://github.com/Fuco1/smartparens +;; +;; This file is not part of GNU Emacs. +;; +;;; License: +;; +;; This file is part of Smartparens. +;; +;; Smartparens 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 3 of the License, or +;; (at your option) any later version. +;; +;; Smartparens 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 Smartparens. If not, see . +;; +;;; Commentary: +;; +;; This file provides some additional configuration for C/C++ mode. +;; To use it, simply add: +;; +;; (require 'smartparens-c) +;; +;; into your configuration. You can use this in conjunction with the +;; default config or your own configuration. +;; +;;; Code: + +(require 'smartparens) + +;; remap electric delete functions to smartparens function +(define-key smartparens-strict-mode-map [remap c-electric-delete-forward] 'sp-delete-char) +(define-key smartparens-strict-mode-map [remap c-electric-backspace] 'sp-backward-delete-char) + +(sp-with-modes sp-c-modes + (sp-local-pair "{" nil :post-handlers '(("||\n[i]" "RET"))) + (sp-local-pair "/*" "*/" :post-handlers '((" | " "SPC") + ("* ||\n[i]" "RET")))) + +(provide 'smartparens-c) +;;; smartparens-c.el ends here diff --git a/elpa/smartparens-20190112.1318/smartparens-clojure.el b/elpa/smartparens-20191015.1754/smartparens-clojure.el similarity index 97% rename from elpa/smartparens-20190112.1318/smartparens-clojure.el rename to elpa/smartparens-20191015.1754/smartparens-clojure.el index 25b6d6d1..e07e650d 100644 --- a/elpa/smartparens-20190112.1318/smartparens-clojure.el +++ b/elpa/smartparens-20191015.1754/smartparens-clojure.el @@ -40,7 +40,7 @@ (require 'smartparens) (defvar sp-clojure-prefix "\\(?:[@`'#~,_?^]+\\)" - "Prefix used in `sp-sepx-prefix' for clojure modes.") + "Prefix used in `sp-sexp-prefix' for clojure modes.") (dolist (mode '(clojure-mode clojurescript-mode clojurec-mode cider-repl-mode)) (add-to-list 'sp-sexp-prefix `(,mode regexp ,sp-clojure-prefix))) diff --git a/elpa/smartparens-20190112.1318/smartparens-config.el b/elpa/smartparens-20191015.1754/smartparens-config.el similarity index 97% rename from elpa/smartparens-20190112.1318/smartparens-config.el rename to elpa/smartparens-20191015.1754/smartparens-config.el index 2b8665c4..1d2e4b0b 100644 --- a/elpa/smartparens-20190112.1318/smartparens-config.el +++ b/elpa/smartparens-20191015.1754/smartparens-config.el @@ -101,6 +101,8 @@ ID, ACTION, CONTEXT." ;; automatically. If you want to call sp-local-pair outside this ;; macro, you MUST supply the major mode argument. +(--each sp-c-modes + (eval-after-load it '(require 'smartparens-c))) (eval-after-load 'clojure-mode '(require 'smartparens-clojure)) (eval-after-load 'crystal-mode '(require 'smartparens-crystal)) (eval-after-load 'elixir-mode '(require 'smartparens-elixir)) @@ -117,6 +119,7 @@ ID, ACTION, CONTEXT." (eval-after-load it '(require 'smartparens-python))) (eval-after-load 'org '(require 'smartparens-org)) (eval-after-load 'racket-mode '(require 'smartparens-racket)) +(eval-after-load 'rst '(require 'smartparens-rst)) (eval-after-load 'ruby-mode '(require 'smartparens-ruby)) (eval-after-load 'rust-mode '(require 'smartparens-rust)) (eval-after-load 'scala-mode '(require 'smartparens-scala)) diff --git a/elpa/smartparens-20190112.1318/smartparens-crystal.el b/elpa/smartparens-20191015.1754/smartparens-crystal.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-crystal.el rename to elpa/smartparens-20191015.1754/smartparens-crystal.el diff --git a/elpa/smartparens-20190112.1318/smartparens-elixir.el b/elpa/smartparens-20191015.1754/smartparens-elixir.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-elixir.el rename to elpa/smartparens-20191015.1754/smartparens-elixir.el diff --git a/elpa/smartparens-20190112.1318/smartparens-ess.el b/elpa/smartparens-20191015.1754/smartparens-ess.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-ess.el rename to elpa/smartparens-20191015.1754/smartparens-ess.el diff --git a/elpa/smartparens-20190112.1318/smartparens-haskell.el b/elpa/smartparens-20191015.1754/smartparens-haskell.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-haskell.el rename to elpa/smartparens-20191015.1754/smartparens-haskell.el diff --git a/elpa/smartparens-20190112.1318/smartparens-html.el b/elpa/smartparens-20191015.1754/smartparens-html.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-html.el rename to elpa/smartparens-20191015.1754/smartparens-html.el diff --git a/elpa/smartparens-20190112.1318/smartparens-javascript.el b/elpa/smartparens-20191015.1754/smartparens-javascript.el similarity index 97% rename from elpa/smartparens-20190112.1318/smartparens-javascript.el rename to elpa/smartparens-20191015.1754/smartparens-javascript.el index 5ec57462..aa024d68 100644 --- a/elpa/smartparens-20190112.1318/smartparens-javascript.el +++ b/elpa/smartparens-20191015.1754/smartparens-javascript.el @@ -52,4 +52,4 @@ (add-to-list 'sp-sexp-suffix (list it 'regexp ""))) (provide 'smartparens-javascript) -;;; smartparens-javasript.el ends here +;;; smartparens-javascript.el ends here diff --git a/elpa/smartparens-20190112.1318/smartparens-latex.el b/elpa/smartparens-20191015.1754/smartparens-latex.el similarity index 98% rename from elpa/smartparens-20190112.1318/smartparens-latex.el rename to elpa/smartparens-20191015.1754/smartparens-latex.el index cad25373..61d9a00c 100644 --- a/elpa/smartparens-20190112.1318/smartparens-latex.el +++ b/elpa/smartparens-20191015.1754/smartparens-latex.el @@ -97,7 +97,7 @@ ID, ACTION, CONTEXT." (sp-local-pair "`" "'" :actions '(:rem autoskip) :skip-match 'sp-latex-skip-match-apostrophe - :unless '(sp-latex-point-after-backslash)) + :unless '(sp-latex-point-after-backslash sp-in-math-p)) ;; math modes, yay. The :actions are provided automatically if ;; these pairs do not have global definitions. (sp-local-pair "$" "$") @@ -113,7 +113,7 @@ ID, ACTION, CONTEXT." ;; need to insert ", C-q is our friend. (sp-local-pair "``" "''" :trigger "\"" - :unless '(sp-latex-point-after-backslash) + :unless '(sp-latex-point-after-backslash sp-in-math-p) :post-handlers '(sp-latex-skip-double-quote)) ;; add the prefix function sticking to {} pair diff --git a/elpa/smartparens-20190112.1318/smartparens-lua.el b/elpa/smartparens-20191015.1754/smartparens-lua.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-lua.el rename to elpa/smartparens-20191015.1754/smartparens-lua.el diff --git a/elpa/smartparens-20190112.1318/smartparens-markdown.el b/elpa/smartparens-20191015.1754/smartparens-markdown.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-markdown.el rename to elpa/smartparens-20191015.1754/smartparens-markdown.el diff --git a/elpa/smartparens-20190112.1318/smartparens-ml.el b/elpa/smartparens-20191015.1754/smartparens-ml.el similarity index 95% rename from elpa/smartparens-20190112.1318/smartparens-ml.el rename to elpa/smartparens-20191015.1754/smartparens-ml.el index 55008c4e..7960c5f1 100644 --- a/elpa/smartparens-20190112.1318/smartparens-ml.el +++ b/elpa/smartparens-20191015.1754/smartparens-ml.el @@ -62,6 +62,9 @@ (sp-local-pair "'" nil :actions nil) (sp-local-pair "(*" "*)" )) +;; Ignore punctuation, so we can split ~(foo) to ~foo. +(add-to-list 'sp-sexp-prefix (list 'tuareg-mode 'syntax "")) + (sp-with-modes '(reason-mode) ;; Disable ` because it is used in polymorphic variants (sp-local-pair "`" nil :actions nil) diff --git a/elpa/smartparens-20190112.1318/smartparens-org.el b/elpa/smartparens-20191015.1754/smartparens-org.el similarity index 84% rename from elpa/smartparens-20190112.1318/smartparens-org.el rename to elpa/smartparens-20191015.1754/smartparens-org.el index 083c258d..87dfeca3 100644 --- a/elpa/smartparens-20190112.1318/smartparens-org.el +++ b/elpa/smartparens-20191015.1754/smartparens-org.el @@ -52,12 +52,18 @@ (not (memq (syntax-class (syntax-after (point))) '(2 3))) (<= me (point)))))) +(defun sp-org-point-after-left-square-bracket-p (id action _context) + "Return t if point is after a left square bracket, nil otherwise. +This predicate is only tested on \"insert\" action." + (when (eq action 'insert) + (sp--looking-back-p (concat "\\[" (regexp-quote id))))) + (sp-with-modes 'org-mode (sp-local-pair "*" "*" :unless '(sp-point-after-word-p sp-point-at-bol-p) :skip-match 'sp--org-skip-asterisk) (sp-local-pair "_" "_" :unless '(sp-point-after-word-p)) - (sp-local-pair "/" "/" :unless '(sp-point-after-word-p) :post-handlers '(("[d1]" "SPC"))) + (sp-local-pair "/" "/" :unless '(sp-point-after-word-p sp-org-point-after-left-square-bracket-p) :post-handlers '(("[d1]" "SPC"))) (sp-local-pair "~" "~" :unless '(sp-point-after-word-p) :post-handlers '(("[d1]" "SPC"))) (sp-local-pair "=" "=" :unless '(sp-point-after-word-p) :post-handlers '(("[d1]" "SPC"))) (sp-local-pair "«" "»")) diff --git a/elpa/smartparens-20190112.1318/smartparens-pkg.el b/elpa/smartparens-20191015.1754/smartparens-pkg.el similarity index 71% rename from elpa/smartparens-20190112.1318/smartparens-pkg.el rename to elpa/smartparens-20191015.1754/smartparens-pkg.el index 0498526e..d711d86d 100644 --- a/elpa/smartparens-20190112.1318/smartparens-pkg.el +++ b/elpa/smartparens-20191015.1754/smartparens-pkg.el @@ -1,4 +1,4 @@ -(define-package "smartparens" "20190112.1318" "Automatic insertion, wrapping and paredit-like navigation with user defined pairs." +(define-package "smartparens" "20191015.1754" "Automatic insertion, wrapping and paredit-like navigation with user defined pairs." '((dash "2.13.0") (cl-lib "0.3"))) ;; Local Variables: diff --git a/elpa/smartparens-20190112.1318/smartparens-python.el b/elpa/smartparens-20191015.1754/smartparens-python.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-python.el rename to elpa/smartparens-20191015.1754/smartparens-python.el diff --git a/elpa/smartparens-20190112.1318/smartparens-racket.el b/elpa/smartparens-20191015.1754/smartparens-racket.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-racket.el rename to elpa/smartparens-20191015.1754/smartparens-racket.el diff --git a/elpa/smartparens-20191015.1754/smartparens-rst.el b/elpa/smartparens-20191015.1754/smartparens-rst.el new file mode 100644 index 00000000..b1e25f8a --- /dev/null +++ b/elpa/smartparens-20191015.1754/smartparens-rst.el @@ -0,0 +1,62 @@ +;;; smartparens-rst.el --- Additional configuration for rst based modes. -*- lexical-binding: t; -*- + +;; Copyright (C) 2019 Matus Goljer + +;; Author: Matus Goljer +;; Maintainer: Matus Goljer +;; Created: 28th January 2019 +;; Keywords: abbrev convenience editing +;; URL: https://github.com/Fuco1/smartparens + +;; This file is not part of GNU Emacs. + +;;; License: + +;; This file is part of Smartparens. + +;; Smartparens 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 3 of the License, or +;; (at your option) any later version. + +;; Smartparens 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 Smartparens. If not, see . + +;;; Commentary: + +;; This file provides some additional configuration for rst based +;; modes. To use it, simply add: +;; +;; (require 'smartparens-rst) +;; +;; into your configuration. You can use this in conjunction with the +;; default config or your own configuration. +;; +;; If you have good ideas about what should be added please file an +;; issue on the github tracker. +;; +;; For more info, see github readme at +;; https://github.com/Fuco1/smartparens + +;;; Code: + +(require 'smartparens) +(require 'smartparens-text) +(require 'smartparens-markdown) + +(sp-with-modes 'rst-mode + (sp-local-pair "*" "*" + :unless '(sp--gfm-point-after-word-p sp-point-at-bol-p) + :post-handlers '(("[d1]" "SPC")) + :skip-match 'sp--gfm-skip-asterisk) + (sp-local-pair "**" "**") + (sp-local-pair "_" "_" :unless '(sp-point-after-word-p)) + (sp-local-pair "``" "``")) + +(provide 'smartparens-rst) +;;; smartparens-rst.el ends here diff --git a/elpa/smartparens-20190112.1318/smartparens-ruby.el b/elpa/smartparens-20191015.1754/smartparens-ruby.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-ruby.el rename to elpa/smartparens-20191015.1754/smartparens-ruby.el diff --git a/elpa/smartparens-20190112.1318/smartparens-rust.el b/elpa/smartparens-20191015.1754/smartparens-rust.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-rust.el rename to elpa/smartparens-20191015.1754/smartparens-rust.el diff --git a/elpa/smartparens-20190112.1318/smartparens-scala.el b/elpa/smartparens-20191015.1754/smartparens-scala.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-scala.el rename to elpa/smartparens-20191015.1754/smartparens-scala.el diff --git a/elpa/smartparens-20190112.1318/smartparens-text.el b/elpa/smartparens-20191015.1754/smartparens-text.el similarity index 100% rename from elpa/smartparens-20190112.1318/smartparens-text.el rename to elpa/smartparens-20191015.1754/smartparens-text.el diff --git a/elpa/smartparens-20190112.1318/smartparens.el b/elpa/smartparens-20191015.1754/smartparens.el similarity index 99% rename from elpa/smartparens-20190112.1318/smartparens.el rename to elpa/smartparens-20191015.1754/smartparens.el index ab9c9349..fea2d3ee 100644 --- a/elpa/smartparens-20190112.1318/smartparens.el +++ b/elpa/smartparens-20191015.1754/smartparens.el @@ -610,6 +610,14 @@ Symbol is defined as a chunk of text recognized by :type '(repeat symbol) :group 'smartparens) +(defcustom sp-c-modes '( + c-mode + c++-mode + ) + "List of C-related modes." + :type '(repeat symbol) + :group 'smartparens) + (defcustom sp-no-reindent-after-kill-modes '( python-mode coffee-mode @@ -3260,9 +3268,10 @@ last form; otherwise do nothing." ;; why we need each of these. (defun sp--save-pre-command-state () "Save some of the buffer state before `pre-command-hook'." - (setq sp-point-inside-string (sp-point-in-string)) - (setq sp-pre-command-point (point)) - (setq sp-buffer-modified-p (buffer-modified-p))) + (when smartparens-mode + (setq sp-point-inside-string (sp-point-in-string)) + (setq sp-pre-command-point (point)) + (setq sp-buffer-modified-p (buffer-modified-p)))) (add-hook 'pre-command-hook 'sp--save-pre-command-state) @@ -6337,6 +6346,8 @@ The argument INTERACTIVE is for internal use only. If called interactively and `sp-navigate-reindent-after-up' is enabled for current major-mode, remove the whitespace between end of the expression and the last \"thing\" inside the expression. +This behaviour can be suppressed for syntactic string sexps by +setting `sp-navigate-reindent-after-up-in-string' to nil. If `sp-navigate-close-if-unbalanced' is non-nil, close the unbalanced expressions automatically. @@ -7559,9 +7570,9 @@ Examples: With BACK non-nil, move backwards." (if back - (while (not (sp-point-in-string)) + (while (and (not (sp-point-in-string)) (> (point) (point-min))) (backward-char)) - (while (not (sp-point-in-string)) + (while (and (not (sp-point-in-string)) (< (point) (point-max))) (forward-char)))) ;; TODO: in ruby, "foo |if bar" now moves correctly, but there's a @@ -9304,6 +9315,11 @@ the opening delimiter or before the closing delimiter." :type 'boolean :group 'show-smartparens) +(defcustom sp-show-pair-match-priority 1000 + "Priority of matching pair highlighting overlays." + :type 'integer + :group 'show-smartparens) + (defface sp-show-pair-match-face '((t (:inherit show-paren-match))) "`show-smartparens-mode' face used for a matching pair." @@ -9463,9 +9479,9 @@ matching paren in the echo area if not visible on screen." (unless (use-region-p) (overlay-put omiddle 'face 'sp-show-pair-match-content-face)) (overlay-put oright 'face 'sp-show-pair-match-face) - (overlay-put oleft 'priority 1000) + (overlay-put oleft 'priority sp-show-pair-match-priority) (overlay-put omiddle 'priority 1000) - (overlay-put oright 'priority 1000) + (overlay-put oright 'priority sp-show-pair-match-priority) (overlay-put oleft 'type 'show-pair))) (defun sp-show--pair-echo-match (start end olen clen) -- 2.47.3