]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix last major-mode-remap-defaults change.
authorBasil L. Contovounesios <basil@contovou.net>
Mon, 4 Mar 2024 06:19:22 +0000 (07:19 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 5 Mar 2024 15:29:42 +0000 (16:29 +0100)
(cherry picked from commit 6dacb60bb135dbb002c2ce1c70f70430c5d1bbff)

lisp/org/ox.el
lisp/progmodes/c-ts-mode.el
lisp/progmodes/cc-mode.el

index 8e2fdd22acdc20925930f5934bb789210e6ef863..bf2d9b569af367b62794ade75e0d86061e14b9b7 100644 (file)
@@ -6608,7 +6608,7 @@ use it to set a major mode there, e.g.,
     (interactive)
     (org-export-to-buffer \\='latex \"*Org LATEX Export*\"
       async subtreep visible-only body-only ext-plist
-      (major-mode-remap 'latex-mode)))
+      (major-mode-remap \\='latex-mode)))
 
 When expressed as an anonymous function, using `lambda',
 POST-PROCESS needs to be quoted.
index 315bb68699e07f103048a9d2e6501b9289e4d229..38b72e59388fc96ef993e1828986f8d8128f4980 100644 (file)
@@ -1438,7 +1438,7 @@ should be used.
 This function attempts to use file contents to determine whether
 the code is C or C++ and based on that chooses whether to enable
 `c-ts-mode' or `c++-ts-mode'."
-  (declare (obsolete c-or-c++-mode "30.1"))?
+  (declare (obsolete c-or-c++-mode "30.1"))
   (interactive)
   (let ((mode
          (if (save-excursion
@@ -1447,8 +1447,8 @@ the code is C or C++ and based on that chooses whether to enable
                    (widen)
                    (goto-char (point-min))
                    (re-search-forward c-ts-mode--c-or-c++-regexp nil t))))
-             'c++-ts-mode)
-         'c-ts-mode))
+             'c++-ts-mode
+           'c-ts-mode)))
     (funcall (major-mode-remap mode))))
 
 ;; The entries for C++ must come first to prevent *.c files be taken
index e46ac2e2178fc0e4af85c2dd9447ee6848a09000..1a9d0907bd0eab1e5dcf867573ba134739d5d1e3 100644 (file)
@@ -2910,8 +2910,8 @@ the code is C or C++ and based on that chooses whether to enable
                   (goto-char (point-min))
                   (re-search-forward c-or-c++-mode--regexp
                                      (+ (point) c-guess-region-max) t))))
-            'c++-mode)
-        'c-mode))
+            'c++-mode
+          'c-mode)))
     (funcall (if (fboundp 'major-mode-remap)
                 (major-mode-remap mode)
               mode))))