summaryrefslogtreecommitdiff
path: root/lisp/descr-text.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-08-29 15:55:58 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-08-29 15:55:58 -0400
commit40f7e0e853bf21003fdffeac35e47616f393055d (patch)
tree25770d0dcff8956a77b577d5467caffe37fb0e0f /lisp/descr-text.el
parent7763d67c87ae050d4e7cc28f1e0c4b14df037d2e (diff)
downloademacs-40f7e0e853bf21003fdffeac35e47616f393055d.tar.gz
Misc changes to reduce use of `(lambda...); and other cleanups.
* lisp/cus-edit.el: Use lexical-binding. (customize-push-and-save, customize-apropos) (custom-buffer-create-internal): Use closures. * lisp/progmodes/bat-mode.el (bat-mode-syntax-table): "..." are strings. * lisp/progmodes/ada-xref.el: Use setq. * lisp/net/tramp.el (with-tramp-progress-reporter): Avoid setq. * lisp/dframe.el: Use lexical-binding. (dframe-frame-mode): Fix calling convention for hooks. Use a closure. * lisp/speedbar.el (speedbar-frame-mode): Adjust call accordingly. * lisp/descr-text.el: Use lexical-binding. (describe-text-widget, describe-text-sexp, describe-property-list): Use closures. * lisp/comint.el (comint-history-isearch-push-state): Use a closure. * lisp/calculator.el: Use lexical-binding. (calculator-number-to-string): Make it work with lexical-binding. (calculator-funcall): Same and use cl-letf.
Diffstat (limited to 'lisp/descr-text.el')
-rw-r--r--lisp/descr-text.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 774ee92a146..134dbdfb33b 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -1,4 +1,4 @@
-;;; descr-text.el --- describe text mode
+;;; descr-text.el --- describe text mode -*- lexical-binding:t -*-
;; Copyright (C) 1994-1996, 2001-2013 Free Software Foundation, Inc.
@@ -23,7 +23,7 @@
;;; Commentary:
-;;; Describe-Text Mode.
+;; Describe-Text Mode.
;;; Code:
@@ -36,8 +36,7 @@
"Insert text to describe WIDGET in the current buffer."
(insert-text-button
(symbol-name (if (symbolp widget) widget (car widget)))
- 'action `(lambda (&rest ignore)
- (widget-browse ',widget))
+ 'action (lambda (&rest _ignore) (widget-browse widget))
'help-echo "mouse-2, RET: browse this widget")
(insert " ")
(insert-text-button
@@ -55,10 +54,10 @@
(<= (length pp) (- (window-width) (current-column))))
(insert pp)
(insert-text-button
- "[Show]" 'action `(lambda (&rest ignore)
- (with-output-to-temp-buffer
- "*Pp Eval Output*"
- (princ ',pp)))
+ "[Show]" 'action (lambda (&rest _ignore)
+ (with-output-to-temp-buffer
+ "*Pp Eval Output*"
+ (princ pp)))
'help-echo "mouse-2, RET: pretty print value in another buffer"))))
(defun describe-property-list (properties)
@@ -81,8 +80,8 @@ into help buttons that call `describe-text-category' or
(cond ((eq key 'category)
(insert-text-button
(symbol-name value)
- 'action `(lambda (&rest ignore)
- (describe-text-category ',value))
+ 'action (lambda (&rest _ignore)
+ (describe-text-category value))
'follow-link t
'help-echo "mouse-2, RET: describe this category"))
((memq key '(face font-lock-face mouse-face))
@@ -663,7 +662,7 @@ relevant to POS."
((and (< char 32) (not (memq char '(9 10))))
'escape-glyph)))))
(if face (list (list "hardcoded face"
- `(insert-text-button
+ `(insert-text-button ;FIXME: Wrap in lambda!
,(symbol-name face)
'type 'help-face
'help-args '(,face))))))