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/obsolete | |
| 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/obsolete')
| -rw-r--r-- | lisp/obsolete/ess-eldoc.el | 4 | ||||
| -rwxr-xr-x | lisp/obsolete/ess-font-lock.el | 2 | ||||
| -rw-r--r-- | lisp/obsolete/ess-mouse.el | 18 | ||||
| -rw-r--r-- | lisp/obsolete/ess-r-a.el | 8 | ||||
| -rw-r--r-- | lisp/obsolete/mouseme.el | 20 | ||||
| -rw-r--r-- | lisp/obsolete/msdos.el | 8 |
6 files changed, 28 insertions, 32 deletions
diff --git a/lisp/obsolete/ess-eldoc.el b/lisp/obsolete/ess-eldoc.el index 3e9700a..4394b94 100644 --- a/lisp/obsolete/ess-eldoc.el +++ b/lisp/obsolete/ess-eldoc.el @@ -1,6 +1,6 @@ -;;; ess-eldoc.el --- Use eldoc to report R function names. +;;; ess-eldoc.el --- Use eldoc to report R function names. -*- lexical-binding: t; -*- -;; Copyright (C) 1997-2020 Free Software Foundation, Inc. +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: Stephen Eglen ;; Created: 2007-06-30 ;; Maintainer: ESS-core <ESS-core@r-project.org> diff --git a/lisp/obsolete/ess-font-lock.el b/lisp/obsolete/ess-font-lock.el index b948fd3..0487b55 100755 --- a/lisp/obsolete/ess-font-lock.el +++ b/lisp/obsolete/ess-font-lock.el @@ -1,4 +1,4 @@ -;;; ess-font-lock.el --- font-lock color options +;;; ess-font-lock.el --- font-lock color options -*- lexical-binding: t; -*- ;; Copyright (C) 2000-2022 Free Software Foundation, Inc. diff --git a/lisp/obsolete/ess-mouse.el b/lisp/obsolete/ess-mouse.el index 972878c..001170a 100644 --- a/lisp/obsolete/ess-mouse.el +++ b/lisp/obsolete/ess-mouse.el @@ -1,6 +1,6 @@ -;;; ess-mouse.el --- Support for mouse- or cursor-sensitive actions +;;; ess-mouse.el --- Support for mouse- or cursor-sensitive actions -*- lexical-binding: t; -*- -;; Copyright (C) 2001-2020 Free Software Foundation, Inc. +;; Copyright (C) 2001-2022 Free Software Foundation, Inc. ;; Author: Richard M. Heiberger <rmh@temple.edu> ;; Created: 25 Mar 2001 ;; Maintainer: ESS-core <ESS-core@r-project.org> @@ -94,7 +94,7 @@ (setq cmd (funcall func name)) ;; run the command, eval'ing if it was a list (if (listp cmd) - (setq cmd (eval cmd))) + (setq cmd (eval cmd t))) (setq mmtype (get cmd 'mouse-me-type)) (cond ((eq mmtype 'region) (funcall cmd beg end)) @@ -160,7 +160,7 @@ the symbol `string' it will be called with one string argument." (defun ess-mouse-me-eval-expanded (string &optional head tail commands-buffer - page value-returned) + _page value-returned) "Send the expanded STRING to the inferior-ess process using `ess-command' after first concating the HEAD and TAIL. Put answer in COMMANDS-BUFFER if specified, otherwise in \"tmp-buffer\". In either @@ -169,7 +169,7 @@ constructed command. If PAGE is non-nil, expand the string one more time by embedding it in a \"page()\" command." (interactive) (let* (scommand - page-scommand + ;; page-scommand (lproc-name ess-local-process-name) (ess-mouse-customize-alist ess-local-customize-alist)) (if (not head) (setq head "summary(")) @@ -180,7 +180,7 @@ the string one more time by embedding it in a \"page()\" command." (ess-make-buffer-current) (pop-to-buffer-same-window commands-buffer) - (ess-setq-vars-local (eval ess-mouse-customize-alist) (current-buffer)) + (ess-setq-vars-local (eval ess-mouse-customize-alist t) (current-buffer)) (setq ess-local-process-name lproc-name) (ess-command (concat scommand "\n") commands-buffer) (if (not value-returned) (pop-to-buffer-same-window (nth 1 (buffer-list)))) @@ -213,9 +213,9 @@ the string one more time by embedding it in a \"page()\" command." ;; (defun ess-S-mouse-me-ess-transcript-mode () ;; (define-key ess-transcript-mode-map [S-mouse-3] 'ess-mouse-me)) ;; -(add-hook 'ess-mode-hook 'ess-S-mouse-me-menu-commands) -(add-hook 'inferior-ess-mode-hook 'ess-S-mouse-me-menu-commands) -(add-hook 'ess-transcript-mode-hook 'ess-S-mouse-me-menu-commands) +(add-hook 'ess-mode-hook #'ess-S-mouse-me-menu-commands) +(add-hook 'inferior-ess-mode-hook #'ess-S-mouse-me-menu-commands) +(add-hook 'ess-transcript-mode-hook #'ess-S-mouse-me-menu-commands) ;; (add-hook 'ess-transcript-mode-hook 'ess-S-mouse-me-ess-transcript-mode) diff --git a/lisp/obsolete/ess-r-a.el b/lisp/obsolete/ess-r-a.el index 030a83f..7872fba 100644 --- a/lisp/obsolete/ess-r-a.el +++ b/lisp/obsolete/ess-r-a.el @@ -1,6 +1,6 @@ ;;; ess-r-a.el -- Possible local customizations for R with ESS. -*- lexical-binding: t; -*- -;; Copyright (C) 1997-2020 Free Software Foundation, Inc. +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: A.J. Rossini <blindglobe@gmail.com> ;; Created: 17 November 1999 ;; Maintainer: ESS-core <ESS-core@r-project.org> @@ -42,7 +42,7 @@ (declare-function ns-do-applescript "nsfns.m" (script)) (declare-function do-applescript "ess-r-a" (script)) (unless (fboundp 'do-applescript) - (defalias 'do-applescript 'ns-do-applescript)) + (defalias 'do-applescript #'ns-do-applescript)) (defalias 'essr (read-kbd-macro @@ -142,8 +142,8 @@ is)." ;; call this once ;; (ajr::scroll-to-end::peterD "emacs") - (global-set-key [f11] 'show-max-other-window) - (global-set-key [f12] 'ess-eval-line-visibly-and-step)) + (global-set-key [f11] #'show-max-other-window) + (global-set-key [f12] #'ess-eval-line-visibly-and-step)) ; Provide package diff --git a/lisp/obsolete/mouseme.el b/lisp/obsolete/mouseme.el index 7233da5..d21112e 100644 --- a/lisp/obsolete/mouseme.el +++ b/lisp/obsolete/mouseme.el @@ -1,6 +1,6 @@ -;;; mouseme.el --- mouse menu with commands that operate on strings +;;; mouseme.el --- mouse menu with commands that operate on strings -*- lexical-binding: t; -*- -;; Copyright (C) 1997-2020 by Free Software Foundation, Inc. +;; Copyright (C) 1997-2022 by Free Software Foundation, Inc. ;; Author: Howard Melman <howard@silverstream.com> ;; Keywords: mouse, menu @@ -78,8 +78,7 @@ It can return either the string or to be most efficient, a list of three elements: the string and the beginning and ending points of the string in the buffer." :type 'function - :options '(mouse-me-get-string) - :group 'mouseme) + :options '(mouse-me-get-string)) (defcustom mouse-me-build-menu-function 'mouse-me-build-menu "Function used by `mouse-me' to build the popup menu. @@ -88,8 +87,7 @@ be made buffer local and set to something more appropriate for a specific mode. The function will be called with one argument, the string selected, as returned by `mouse-me-get-string-function'." :type 'function - :options '(mouse-me-build-menu) - :group 'mouseme) + :options '(mouse-me-build-menu)) (defvar mouse-me-grep-use-extension 't "If non-nil `mouse-me-grep' grep's in files with current file's extension.") @@ -133,8 +131,7 @@ argument. Or if the function has the symbol property `mouse-me-type' and if its value is the symbol `region' it will be called with the beginning and ending points of the selected string. If the value is the symbol `string' it will be called with one string argument." - :type '(repeat sexp) - :group 'mouseme) + :type '(repeat sexp)) (put 'kill-region 'mouse-me-type 'region) (put 'ispell-region 'mouse-me-type 'region) @@ -179,7 +176,7 @@ Returns a list of three elements, the string and the beginning and ending positions of the string in the buffer in that order." (save-match-data (save-excursion - (let ((start (point)) beg end str p) + (let ((start (point)) beg end str) (skip-syntax-forward "^ >()\"") (setq end (point)) (goto-char start) @@ -285,8 +282,7 @@ ending positions of the string in the buffer in that order." (interactive "sGrep: ") (grep-compute-defaults) (let ((reg grep-find-command) - (ext (mouse-me-buffer-file-extension)) - beg end) + (ext (mouse-me-buffer-file-extension))) (if (string-match "\\(^.+-type f \\)\\(.+$\\)" reg) (setq reg (concat (match-string 1 reg) (if mouse-me-grep-use-extension @@ -344,7 +340,7 @@ Returned extension is a string begining with a period." (setq cmd (funcall func)) ;; run the command, eval'ing if it was a list (if (listp cmd) - (setq cmd (eval cmd))) + (setq cmd (eval cmd t))) (setq mmtype (get cmd 'mouse-me-type)) (cond ((eq mmtype 'region) (funcall cmd beg end)) diff --git a/lisp/obsolete/msdos.el b/lisp/obsolete/msdos.el index c73a814..f3e1d9a 100644 --- a/lisp/obsolete/msdos.el +++ b/lisp/obsolete/msdos.el @@ -1,6 +1,6 @@ -;;; msdos.el --- Run an MS-DOS shell in an NTemacs buffer with bash as the shell +;;; msdos.el --- Run an MS-DOS shell in an NTemacs buffer with bash as the shell -*- lexical-binding: t; -*- -;; Copyright (C) 1999-2020 Free Software Foundation, Inc. +;; Copyright (C) 1999-2022 Free Software Foundation, Inc. ;; Author: Richard M. Heiberger <rmh@temple.edu> ;; Created: February 1999 ;; Maintainer: ESS-core <ESS-core@r-project.org> @@ -104,7 +104,7 @@ its value is used as a list of arguments when invoking the shell. (save-excursion (setenv "COMSPEC" explicit-msdos-comspec-file-name) (setenv "SHELL" explicit-msdos-shell-file-name) - (set-buffer (apply 'make-comint "msdos" prog + (set-buffer (apply #'make-comint "msdos" prog (if (and xargs-name (boundp xargs-name)) (symbol-value xargs-name)) (if (file-exists-p startfile) @@ -142,7 +142,7 @@ d. strips ctrl-m from output. (setq msdos-minor-mode t) (set (make-local-variable 'comint-completion-addsuffix) '("\\" . " ")) (setq comint-process-echoes t) - (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) + (add-hook 'comint-output-filter-functions #'shell-strip-ctrl-m nil t) (set-process-coding-system (get-buffer-process (current-buffer)) 'raw-text-dos 'raw-text-dos) ;; buffer-process-coding-system is critical. ) |
