diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-11-01 10:47:17 -0400 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-11-01 10:47:17 -0400 |
| commit | fbc2ef3606243c4f86021af8c097470a98847969 (patch) | |
| tree | 5e09863605ccb0844444189494e0c83a474661d1 /lisp/ess-gretl.el | |
| parent | 60e9790b35fdac1b254b66438fedaeebb8a82c91 (diff) | |
Fix compilation of package installed from Git; plus cosmeticsscratch/ess
In `test/*.el`: Provide "test/etest/etest" to `require` so Emacs can find
the file when the package is compiled.
In `*.el`: Prefer #' to quote named functions.
Use `lexical-binding` in all the remaining files.
Use lexical-binding also in `eval`.
Remove redundant let-bindings of obsolete variable
`inhibit-point-motion-hooks`.
Replace uses of `point-at-bol` and `point-at-eol`, both marked obsolete
in Emacs-29. Use `defalias` rather than `fset` to define a function.
Fix occasional incorrect uses of ' in docstrings.
Remove some redundant `:group` arguments.
Add leading `_` to unused args.
In addition to the above, a few, more specifc, tweaks:
* lisp/ess-r-mode.el (ess-offset, ess-offset-type): Strength-reduce
`eval` to `symbol-value`.
(ess-rutils-rsitesearch): Hoist the common `browse-url` out of the `if`.
* lisp/ess-r-package.el: Don't test `fboundp` before `advice-add` since
we require Emacsā„25. Don't require `shell` since `advice-add` also
works when the function is not yet defined.
* lisp/ess-r-syntax.el (ess-parser--backward): Give it a global nil
value, both to declare it as dynamically scoped and to simplify
the code. All users adjusted not to bother with `bound-and-true-p`.
(ess-node): Hoist common `gethash` out of the `if`.
* lisp/ess-sas-a.el (ess-sas-rtf-portrait, ess-sas-rtf-landscape):
Add FIXME.
* lisp/ess-sas-d.el (ess-electric-run-semicolon): Re-indent. Add FIXME.
* lisp/ess-sas-l.el (beginning-of-sas-statement): Rename statically
scoped arg to avoid conflict with dynamically scoped var.
(sas-prev-line): Make (unused) arg optional.
(ess-imenu-SAS): Use [:alpha:] and [:alnum:].
* lisp/ess-tracebug.el (ess--tb-start, ess--tb-stop):
Use `advice-add/remove` to redefine `ess-parse-errors`.
* lisp/ess.el (ess-version-string): Don't presume `point-min` is `1`.
* lisp/obsolete/ess-mouse.el (ess-mouse-me-eval-expanded):
Remove unused var `page-scommand`.
* lisp/obsolete/mouseme.el (mouse-me-get-string, mouse-me-find-grep):
Remove unnused vars `p`, `beg`, and `end`.
* test/ess-test-inf.el (ess-test-inferior-local-start-args):
Use `*proc*` rather than undocumented `*inf-buf*`.
(ess-inf-send-fn-test, ess-inf-send-cat-some.text-test): Remove unused
var `output-nowait`.
* test/ess-test-literate.el (chunk-end): Remove `defvar`.
(elt-process-next-chunk, elt-process-next-subchunk, elt-process-case)
(elt-process-code): Pass/take `chunk-end` as argument instead.
* test/ess-test-org.el (test-org-R-ouput): Remove unused var `inf-proc`.
* test/ess-test-r-utils.el (with-ess-test-file): Add FIXME.
(ess-test-sleep-while, ess-test-unwind-protect): Move before first use.
Split the bulk of the code into a function, to ease debugging, avoid
name captures, and improve error messages.
(with-r-running): Split the bulk of the code into a function.
Document the `*proc*` var. Add FIXME.
(output, face-at, token=): Add FIXME.
(output=): Remove redundant `eval`.
* test/ess-test-r.el (ess-r-inherits-prog-mode-test): Turn global
`ess-test-prog-hook` var into local `pmh-was-run`.
* test/literate/fontification.el (face-at-point): Remove unused function.
* test/literate/roxy.el (face-at-point, faces-at-point):
Remove unused functions.
Diffstat (limited to 'lisp/ess-gretl.el')
| -rw-r--r-- | lisp/ess-gretl.el | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/ess-gretl.el b/lisp/ess-gretl.el index 9e3fa30..feba05c 100644 --- a/lisp/ess-gretl.el +++ b/lisp/ess-gretl.el @@ -1,6 +1,6 @@ ;; ess-gretl.el --- ESS gretl mode and inferior interaction -*- lexical-binding: t; -*- -;; Copyright (C) 2012-2020 Free Software Foundation, Inc. +;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Author: Ahmadou Dicko, Spinu Vitalie and Allin Cottrell ;; Maintainer: ESS Core Team <ESS-core@r-project.org> ;; Created: 01-10-2012 (ESS 12.09) @@ -252,20 +252,22 @@ parenthetical grouping.") (defconst gretl-font-lock-keywords + ;; FIXME: Instead of `mapconcat #'identity', if these vars only contain + ;; strings (rather than regexps), we should use `regexp-opt'. (list ;; Fontify all builtin keywords. (cons (concat "\\<\\(" - (mapconcat 'identity gretl-keywords "\\|") + (mapconcat #'identity gretl-keywords "\\|") "\\)\\>") 'font-lock-keyword-face) ;; Fontify all option flags. (cons (concat "[ \t]--\\(" - (mapconcat 'identity gretl-option-flags "\\|") + (mapconcat #'identity gretl-option-flags "\\|") "\\)") 'font-lock-constant-face) ;; Fontify all command words. (cons (concat "\\<\\(" - (mapconcat 'identity gretl-command-words "\\|") + (mapconcat #'identity gretl-command-words "\\|") "\\)\\>") 'font-lock-builtin-face) ;; Fontify all builtin operators. @@ -275,13 +277,13 @@ parenthetical grouping.") 'font-lock-preprocessor-face)) ;; Fontify all internal variables. (cons (concat "\\$\\(" - (mapconcat 'identity gretl-internal-vars "\\|") + (mapconcat #'identity gretl-internal-vars "\\|") "\\)\\>") 'font-lock-variable-name-face) ;; Fontify all genr functions. (cons (concat "\\<\\(" - (mapconcat 'identity gretl-genr-functions "\\|") + (mapconcat #'identity gretl-genr-functions "\\|") "\\)\\>") 'font-lock-variable-name-face) ;; Fontify all function declarations. @@ -293,17 +295,17 @@ parenthetical grouping.") (defvar gretl-block-begin-regexp (concat "\\<\\(" - (mapconcat 'identity gretl-block-start-keywords "\\|") + (mapconcat #'identity gretl-block-start-keywords "\\|") "\\)\\>")) (defvar gretl-block-else-regexp (concat "\\<\\(" - (mapconcat 'identity gretl-block-other-keywords "\\|") + (mapconcat #'identity gretl-block-other-keywords "\\|") "\\)\\>")) (defvar gretl-block-end-regexp (concat "\\<\\(" - (mapconcat 'identity gretl-block-end-keywords "\\|") + (mapconcat #'identity gretl-block-end-keywords "\\|") "\\)\\>")) (defvar gretl-block-begin-or-end-regexp @@ -378,7 +380,7 @@ end keywords as associated values.") (interactive) (end-of-line) (indent-line-to - (or (and (ess-inside-string-p (point-at-bol)) 0) + (or (and (ess-inside-string-p (line-beginning-position)) 0) (save-excursion (ignore-errors (gretl-form-indent))) (save-excursion (let ((endtok (progn @@ -544,7 +546,7 @@ to gretl, put them in the variable `inferior-gretl-args'." "'] ? ")) nil))) (inf-buf (inferior-ess r-start-args gretl-customize-alist))) - (setq-local indent-line-function 'gretl-indent-line) + (setq-local indent-line-function #'gretl-indent-line) (setq-local gretl-basic-offset 4) (setq indent-tabs-mode nil) (goto-char (point-max)) |
