branch: externals/cm-mode
commit 6f245e2d12b06814a4a8ebdc1567ba1c96c14715
Author: Joost Kremers <[email protected]>
Commit: Joost Kremers <[email protected]>

    Make Emacs 25.1 the minimum version.
    
    Emacs 24 is 12 years old by now, I think it's safe to assume it's not being 
used
    much anymore.
---
 cm-mode.el | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/cm-mode.el b/cm-mode.el
index 73c25d1271..89e39a8ded 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -7,7 +7,7 @@
 ;; Created: 14 Feb 2013
 ;; Version: 1.7
 ;; Keywords: text, markdown
-;; Package-Requires: ((cl-lib "0.5"))
+;; Package-Requires: ((emacs "25.1") (cl-lib "0.5"))
 
 ;; Redistribution and use in source and binary forms, with or without
 ;; modification, are permitted provided that the following conditions
@@ -94,12 +94,6 @@
 (require 'thingatpt)
 (require 'cl-lib)
 
-;; Add a compatibility function for Emacs 24.
-(defalias 'cm-font-lock-ensure (if (fboundp 'font-lock-ensure)
-                                 'font-lock-ensure
-                               'font-lock-fontify-buffer)
-  "Compatibility function for Emacs 24.")
-
 (defvar cm-follow-changes nil
   "Flag indicating whether follow changes mode is active.")
 (make-variable-buffer-local 'cm-follow-changes)
@@ -263,7 +257,7 @@ This keymap contains only one binding: `C-c *', which is 
bound to
     (when cm-read-only-annotations
       (add-to-list 'font-lock-extra-managed-props 'read-only))
     (add-to-list 'font-lock-extra-managed-props 'rear-nonsticky)
-    (cm-font-lock-ensure)
+    (font-lock-ensure)
     (setq cm-current-markup-overlay (make-overlay 1 1))
     (overlay-put cm-current-markup-overlay 'face 'highlight))
    ((not cm-mode)                       ; `cm-mode' is turned off.
@@ -272,8 +266,8 @@ This keymap contains only one binding: `C-c *', which is 
bound to
     (let ((modified (buffer-modified-p)))
       (cm-make-markups-writable)  ; We need to remove the read-only property 
by hand; it's cumbersome to do it with font-lock.
       (unless modified
-    (cm-font-lock-ensure)
         (set-buffer-modified-p nil)))  ; Removing text properties marks the 
buffer as modified, so we may need to adjust.
+    (font-lock-ensure)
     (remove-overlays))))
 
 ;;; Font lock

Reply via email to