all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Dynamic let for lexical scope?
@ 2019-02-12 23:23 Hi-Angel
  2019-02-13  2:59 ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: Hi-Angel @ 2019-02-12 23:23 UTC (permalink / raw)
  To: help-gnu-emacs

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?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-13  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-12 23:23 Dynamic let for lexical scope? Hi-Angel
2019-02-13  2:59 ` Michael Heerdegen
2019-02-13  6:39   ` Hi-Angel

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.