From 3ce35a3d18441031614f78b8333d84e05d8d477c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 15 Nov 2010 19:10:38 +0000 Subject: Summary: New indentation code using SMIE * coq/coq.el (coq-build-prog-args): Avoid meaningless \- escape sequence. (coq-use-smie): New custom var. (coq-smie-grammar): New var. (coq-smie-rules): New function. (coq-guess-or-ask-for-string): Use use-region-p. (coq-mode-config): Use smie-setup if available. * lib/proof-compat.el (use-region-p): Provide fallback definition. --- lib/proof-compat.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/proof-compat.el') diff --git a/lib/proof-compat.el b/lib/proof-compat.el index a9fae654..3918b7ce 100644 --- a/lib/proof-compat.el +++ b/lib/proof-compat.el @@ -119,12 +119,12 @@ The value returned is the value of the last form in BODY." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; -;;; A naughty hack to completion.el -;;; -;;; At the moment IMO completion too eagerly adds stuff to -;;; its database: the completion-before-command function -;;; makes every suffix be added as a completion! +;; +;; A naughty hack to completion.el +;; +;; At the moment IMO completion too eagerly adds stuff to +;; its database: the completion-before-command function +;; makes every suffix be added as a completion! (eval-after-load "completion" '(defun completion-before-command () @@ -137,6 +137,10 @@ The value returned is the value of the last form in BODY." ;;; Backward compatibility for Emacs 22 ;;; +(or (fboundp 'use-region-p) + (defun use-region-p () + (and transient-mark-mode mark-active))) + (or (fboundp 'characterp) (defun characterp (obj) (with-no-warnings (char-valid-p obj)))) -- cgit v1.2.3