Add lexical binding cookies (#389)

* Add lexical binding cookies

* multiple-cursors-core.el: Pacify lexical-binding frenzy in master

* multiple-cursors-core.el: when saving mc/list-file, prepend a
lexical binding flag to avoid emacs master from screaming.  When
inserting strings, use `\\n' instead of (newline).
This commit is contained in:
Pedro A. Aranda Gutiérrez 2025-10-06 22:38:27 +02:00 committed by GitHub
parent 89f1a8df9b
commit 9017f3be6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 13 additions and 14 deletions

View File

@ -1,4 +1,4 @@
;;; mc-cycle-cursors.el
;;; mc-cycle-cursors.el -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2016 Magnar Sveen

View File

@ -1,4 +1,4 @@
;;; mc-edit-lines.el
;;; mc-edit-lines.el -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2016 Magnar Sveen

View File

@ -1,4 +1,4 @@
;;; mc-hide-unmatched-lines-mode.el
;;; mc-hide-unmatched-lines-mode.el -*- lexical-binding: t; -*-
;; Copyright (C) 2014 Aleksey Fedotov

View File

@ -1,4 +1,4 @@
;;; mc-mark-more.el
;;; mc-mark-more.el -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2016 Magnar Sveen

View File

@ -1,4 +1,4 @@
;;; mc-mark-pop.el --- Pop cursors off of the mark stack
;;; mc-mark-pop.el --- Pop cursors off of the mark stack -*- lexical-binding: t; -*-
(require 'multiple-cursors-core)

View File

@ -1,4 +1,4 @@
;;; mc-separate-operations.el - functions that work differently on each cursor
;;; mc-separate-operations.el - functions that work differently on each cursor -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2016 Magnar Sveen

View File

@ -1,4 +1,4 @@
;;; multiple-cursors-core.el --- An experiment in multiple cursors for emacs.
;;; multiple-cursors-core.el --- An experiment in multiple cursors for emacs. -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2016 Magnar Sveen
@ -885,11 +885,10 @@ for running commands with multiple cursors."
"Saves preferences for running commands with multiple cursors to `mc/list-file'"
(with-temp-file mc/list-file
(emacs-lisp-mode)
(insert ";; This file is automatically generated by the multiple-cursors extension.")
(newline)
(insert ";; It keeps track of your preferences for running commands with multiple cursors.")
(newline)
(newline)
(when (> emacs-major-version 30)
(insert ";; -*- lexical-binding: t; -*-\n"))
(insert ";; This file is automatically generated by the multiple-cursors extension.\n")
(insert ";; It keeps track of your preferences for running commands with multiple cursors.\n\n")
(mc/dump-list 'mc/cmds-to-run-for-all)
(newline)
(mc/dump-list 'mc/cmds-to-run-once)))

View File

@ -1,4 +1,4 @@
;;; multiple-cursors.el --- Multiple cursors for emacs.
;;; multiple-cursors.el --- Multiple cursors for emacs. -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2016 Magnar Sveen

View File

@ -1,4 +1,4 @@
;;; rectangular-region-mode.el
;;; rectangular-region-mode.el -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2016 Magnar Sveen