diff options
author | Federico Beffa <beffa@fbengineering.ch> | 2016-05-17 14:13:56 +0200 |
---|---|---|
committer | Federico Beffa <beffa@fbengineering.ch> | 2016-05-17 14:17:38 +0200 |
commit | 1c29f3ef8452860c4301d7ae57c89ac5956d1663 (patch) | |
tree | dd8889bd6a5ce3755d1e82cd16cf73dcd6a83a3d /gnu | |
parent | aa8fff0cebd8390c2faf733da79d9a1499458261 (diff) | |
download | guix-1c29f3ef8452860c4301d7ae57c89ac5956d1663.tar.gz |
gnu: emacs-constants: Remove old patch.
* gnu/packages/patches/emacs-constants-lisp-like.patch: Remove it. * gnu/local.mk (dist_patch_DATA): Remove entry for above patch.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/emacs-constants-lisp-like.patch | 81 |
2 files changed, 0 insertions, 82 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index f64adebb41..4bbded90eb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -466,7 +466,6 @@ dist_patch_DATA = \ gnu/packages/patches/duplicity-test_selection-tmp.patch \ gnu/packages/patches/elfutils-tests-ptrace.patch \ gnu/packages/patches/einstein-build.patch \ - gnu/packages/patches/emacs-constants-lisp-like.patch \ gnu/packages/patches/emacs-exec-path.patch \ gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ gnu/packages/patches/emacs-source-date-epoch.patch \ diff --git a/gnu/packages/patches/emacs-constants-lisp-like.patch b/gnu/packages/patches/emacs-constants-lisp-like.patch deleted file mode 100644 index 5ec37f3adf..0000000000 --- a/gnu/packages/patches/emacs-constants-lisp-like.patch +++ /dev/null @@ -1,81 +0,0 @@ -Add Scheme support - ---- constants/constants.el.orig 2015-12-26 17:44:31.734520833 +0100 -+++ constants/constants.el 2015-12-30 17:41:28.402871263 +0100 -@@ -684,6 +684,33 @@ - - (eval-when-compile (defvar ctable)) - -+(defun constants-is-lisp-like (mode) -+ (save-match-data -+ (string-match "\\(lisp\\|scheme\\)" (symbol-name mode)))) -+ -+(defun constants-is-set-like () -+ (save-excursion -+ (condition-case nil -+ (save-match-data -+ (progn (up-list -1) -+ (or (looking-at "(set[qf!]?\\>") (looking-at "(define\\>")))) -+ (error nil)))) ; return value nil means use default -+ -+;;;###autoload -+(defun constants-lisp-like-function () -+ "Check context for constants insertion." -+ (if (constants-is-set-like) -+ '(emacs-lisp-mode "%n %v%t; %d %u" "e" "(* %p %v)") -+ '(emacs-lisp-mode "(%n %v)%t; %d %u" "e" "(* %p %v)"))) -+ -+;;;###autoload -+(mapc (lambda (mode-hook) -+ (add-hook mode-hook -+ (lambda () -+ (setq constants-language-function -+ 'constants-lisp-like-function)))) -+ '(scheme-mode-hook emacs-lisp-mode-hook lisp-mode-hook)) -+ - ;;;###autoload - (defun constants-insert (&optional unit-system names) - "Insert one or more natural constant definitions in source code. -@@ -826,8 +853,9 @@ - (funcall process-func ins)) - ;; Here comes the insertion stuff for source code editing modes. - ;; First make sure we start a new line -- (if (string-match -- "\\S-" (buffer-substring (point-at-bol) (point-at-eol))) -+ (if (and (string-match -+ "\\S-" (buffer-substring (point-at-bol) (point-at-eol))) -+ (not (constants-is-lisp-like mode))) - ;; non-empty line, insert after this line - (progn - (end-of-line 1) -@@ -841,13 +869,24 @@ - (if (string-match "\\(.*\\)%t\\(.*\\)" line) - (let ((comment-column 42)) - (insert (match-string 1 line)) -- (indent-to comment-column) -- (insert (match-string 2 line))) -+ (if (and (constants-is-lisp-like mode) -+ (or (constants-is-set-like) -+ (null clist))) -+ (save-excursion -+ (progn -+ (move-to-column comment-column t) -+ (insert (match-string 2 line)) -+ ;; insert a newline such that paredit's M-) can mode -+ ;; the closing parentheses to the next line. -+ (newline-and-indent))) -+ (progn -+ (indent-to comment-column) -+ (insert (match-string 2 line))))) - (insert line))) -- (if constants-indent-code -- (newline-and-indent) -- (newline)))))) -- -+ (unless (and (constants-is-lisp-like mode) (null clist)) -+ (if constants-indent-code -+ (newline-and-indent) -+ (newline))))))) - ;;;###autoload - (defun constants-get (&optional const message) - "Return the value of CONST as defined in the constants package. |