mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-08 23:40:24 -08:00
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.
This commit is contained in:
parent
7763d67c87
commit
40f7e0e853
11 changed files with 181 additions and 173 deletions
|
|
@ -185,6 +185,7 @@ expression point is on."
|
|||
(add-hook 'post-self-insert-hook prn-info nil t)
|
||||
(remove-hook 'post-self-insert-hook prn-info t))))
|
||||
|
||||
;; FIXME: This changes Emacs's behavior when the file is loaded!
|
||||
(add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode)
|
||||
|
||||
;;;###autoload
|
||||
|
|
@ -487,11 +488,11 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
|
|||
(defun eldoc-beginning-of-sexp ()
|
||||
(let ((parse-sexp-ignore-comments t)
|
||||
(num-skipped-sexps 0))
|
||||
(condition-case err
|
||||
(condition-case _
|
||||
(progn
|
||||
;; First account for the case the point is directly over a
|
||||
;; beginning of a nested sexp.
|
||||
(condition-case err
|
||||
(condition-case _
|
||||
(let ((p (point)))
|
||||
(forward-sexp -1)
|
||||
(forward-sexp 1)
|
||||
|
|
@ -518,7 +519,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
|
|||
(let ((defn (and (fboundp fsym)
|
||||
(symbol-function fsym))))
|
||||
(and (symbolp defn)
|
||||
(condition-case err
|
||||
(condition-case _
|
||||
(setq defn (indirect-function fsym))
|
||||
(error (setq defn nil))))
|
||||
defn))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue