help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic let for lexical scope?


From: Hi-Angel
Subject: Dynamic let for lexical scope?
Date: Wed, 13 Feb 2019 02:23:01 +0300

I have the following function:

(defun sort-lines-nocase (beg end)
  (let ((sort-fold-case t))
    (sort-lines nil beg end)))

It temporarily changes sort-fold-case. Now, when compiled with

;;; -*- lexical-binding: t -*-

at the top, it causes a warning "Unused lexical variable ‘sort-fold-case’".

I wonder, how do I temporarily change the global sort-fold-case
symbol, and then change it back, aside of surrounding the code with
multiple setq?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]