From 698ff554ac2699ec48fefc85a1307cbc4a183b0d Mon Sep 17 00:00:00 2001
From: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Wed, 26 Jun 2019 10:03:48 -0400
Subject: * lisp/calc/calc-ext.el (math-scalarp): Fix typo

---
 lisp/emacs-lisp/generic.el | 66 +++-------------------------------------------
 1 file changed, 3 insertions(+), 63 deletions(-)

(limited to 'lisp/emacs-lisp/generic.el')

diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el
index e4ed745b25d..3b6ea12ecff 100644
--- a/lisp/emacs-lisp/generic.el
+++ b/lisp/emacs-lisp/generic.el
@@ -234,73 +234,13 @@ Some generic modes are defined in `generic-x.el'."
 	(cond
 	 ((characterp end)   (setq end (char-to-string end)))
 	 ((zerop (length end)) (setq end "\n")))
-        (push (cons start end) normalized)))
+        (push (list start end) normalized)))
     (nreverse normalized)))
 
-(defun generic-set-comment-syntax (st comment-list)
-  "Set up comment functionality for generic mode."
-  (let ((chars nil)
-	(comstyles)
-        (comstyle "")
-        (comment-start nil))
-
-    ;; Go through all the comments.
-    (pcase-dolist (`(,start . ,end) comment-list)
-      (let ((comstyle
-             ;; Reuse comstyles if necessary.
-             (or (cdr (assoc start comstyles))
-                 (cdr (assoc end comstyles))
-                 ;; Otherwise, use a style not yet in use.
-                 (if (not (rassoc "" comstyles)) "")
-                 (if (not (rassoc "b" comstyles)) "b")
-                 "c")))
-       (push (cons start comstyle) comstyles)
-       (push (cons end comstyle) comstyles)
-
-	;; Setup the syntax table.
-	(if (= (length start) 1)
-	    (modify-syntax-entry (aref start 0)
-				 (concat "< " comstyle) st)
-	  (let ((c0 (aref start 0)) (c1 (aref start 1)))
-	    ;; Store the relevant info but don't update yet.
-	    (push (cons c0 (concat (cdr (assoc c0 chars)) "1")) chars)
-	    (push (cons c1 (concat (cdr (assoc c1 chars))
-				   (concat "2" comstyle))) chars)))
-	(if (= (length end) 1)
-	    (modify-syntax-entry (aref end 0)
-				 (concat ">" comstyle) st)
-	  (let ((c0 (aref end 0)) (c1 (aref end 1)))
-	    ;; Store the relevant info but don't update yet.
-	    (push (cons c0 (concat (cdr (assoc c0 chars))
-				   (concat "3" comstyle))) chars)
-	    (push (cons c1 (concat (cdr (assoc c1 chars)) "4")) chars)))))
-
-    ;; Process the chars that were part of a 2-char comment marker
-    (with-syntax-table st               ;For `char-syntax'.
-    (dolist (cs (nreverse chars))
-      (modify-syntax-entry (car cs)
-			   (concat (char-to-string (char-syntax (car cs)))
-				   " " (cdr cs))
-                             st)))))
-
-(defun generic-set-comment-vars (comment-list)
-  (when comment-list
-    (setq-local comment-start (caar comment-list))
-    (setq-local comment-end
-                (let ((end (cdar comment-list)))
-                  (if (string-equal end "\n") "" end)))
-    (setq-local comment-start-skip
-                (concat (regexp-opt (mapcar #'car comment-list))
-                        "+[ \t]*"))
-    (setq-local comment-end-skip
-                (concat "[ \t]*" (regexp-opt (mapcar #'cdr comment-list))))))
-
 (defun generic-mode-set-comments (comment-list)
   "Set up comment functionality for generic mode."
-  (let ((st (make-syntax-table))
-        (comment-list (generic--normalize-comments comment-list)))
-    (generic-set-comment-syntax st comment-list)
-    (generic-set-comment-vars comment-list)
+  (let ((st (make-syntax-table)))
+    (comment-set-syntax st comment-list)
     (set-syntax-table st)))
 
 (defun generic-bracket-support ()
-- 
cgit v1.2.3