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-sas-l.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-sas-l.el')
| -rw-r--r-- | lisp/ess-sas-l.el | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/lisp/ess-sas-l.el b/lisp/ess-sas-l.el index addaa9d..6a1645a 100644 --- a/lisp/ess-sas-l.el +++ b/lisp/ess-sas-l.el @@ -1,6 +1,6 @@ -;;; ess-sas-l.el --- SAS customization +;;; ess-sas-l.el --- SAS customization -*- lexical-binding: t; -*- -;; Copyright (C) 1997-2020 Free Software Foundation, Inc. +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Authors: Richard M. Heiberger ;; A.J. Rossini ;; Rodney Sparapani @@ -148,11 +148,11 @@ A .lst file is a SAS listing file when: (ess-listing-minor-mode 1) (buffer-disable-undo)) -(fset 'sas-log-mode 'SAS-log-mode) -(fset 'SAS-transcript-mode 'SAS-log-mode) -(fset 'sas-transcript-mode 'SAS-log-mode) -(fset 'sas-mode 'SAS-mode) -(fset 'sas-listing-mode 'SAS-listing-mode) +(defalias 'sas-log-mode #'SAS-log-mode) +(defalias 'SAS-transcript-mode #'SAS-log-mode) +(defalias 'sas-transcript-mode #'SAS-log-mode) +(defalias 'sas-mode #'SAS-mode) +(defalias 'sas-listing-mode #'SAS-listing-mode) (defcustom sas-indent-width 4 "Amount to indent sas statements." @@ -779,7 +779,7 @@ number." )) "Font Lock regexs for SAS.") -(defun beginning-of-sas-statement (arg &optional comment-start) +(defun beginning-of-sas-statement (arg &optional comstart) "Move point to beginning of current sas statement." (interactive "P") (let ((pos (point)) @@ -787,7 +787,7 @@ number." (if (search-forward ";" nil 1) (forward-char -1)) (re-search-backward ";[ \n*/]*$" (point-min) 1 arg) (skip-chars-forward sas-comment-chars) - (if comment-start nil + (if comstart nil (if (looking-at "\\*/") (progn (forward-char 2) (skip-chars-forward sas-comment-chars))) @@ -1305,7 +1305,7 @@ be submitted instead. `sas-submitable' is automatically sets to t." (message "---- SAS job submitted ---- ") (if sas-notify;; added 4/7/94 - (set-process-sentinel (get-process proc-name) 'sas-sentinel) + (set-process-sentinel (get-process proc-name) #'sas-sentinel) (display-buffer buf t)))) (message "---- File not submitted ----"))) @@ -1491,29 +1491,29 @@ page ; (if sas-dir-mode-map () (setq sas-dir-mode-map (make-sparse-keymap)) ;;(define-key sas-dir-mode-map "c" 'sas-contents) - (define-key sas-dir-mode-map "p" 'sas-print) - (define-key sas-dir-mode-map "m" 'sas-mark-item) - (define-key sas-dir-mode-map "u" 'sas-unmark-item) - (define-key sas-dir-mode-map " " 'sas-next-line) - (define-key sas-dir-mode-map "\C-n" 'sas-next-line) - (define-key sas-dir-mode-map "\C-p" 'sas-prev-line) - (define-key sas-dir-mode-map "\177" 'sas-prev-line-undo) - (define-key sas-dir-mode-map "\C-b" 'sas-backward-page-narrow) - (define-key sas-dir-mode-map "\C-v" 'sas-forward-page-narrow) - (define-key sas-dir-mode-map "\C-m" 'sas-goto-dataset) - (define-key sas-dir-mode-map [mouse-2] 'sas-mouse-goto-dataset) - (define-key sas-dir-mode-map "t" 'sas-dir-goto-page) - (define-key sas-dir-mode-map "q" 'bury-buffer) - (define-key sas-dir-mode-map "g" 'sas-revert-library) - (define-key sas-dir-mode-map "1" 'digit-argument) - (define-key sas-dir-mode-map "2" 'digit-argument) - (define-key sas-dir-mode-map "3" 'digit-argument) - (define-key sas-dir-mode-map "4" 'digit-argument) - (define-key sas-dir-mode-map "5" 'digit-argument) - (define-key sas-dir-mode-map "6" 'digit-argument) - (define-key sas-dir-mode-map "7" 'digit-argument) - (define-key sas-dir-mode-map "8" 'digit-argument) - (define-key sas-dir-mode-map "9" 'digit-argument) + (define-key sas-dir-mode-map "p" #'sas-print) + (define-key sas-dir-mode-map "m" #'sas-mark-item) + (define-key sas-dir-mode-map "u" #'sas-unmark-item) + (define-key sas-dir-mode-map " " #'sas-next-line) + (define-key sas-dir-mode-map "\C-n" #'sas-next-line) + (define-key sas-dir-mode-map "\C-p" #'sas-prev-line) + (define-key sas-dir-mode-map "\177" #'sas-prev-line-undo) + (define-key sas-dir-mode-map "\C-b" #'sas-backward-page-narrow) + (define-key sas-dir-mode-map "\C-v" #'sas-forward-page-narrow) + (define-key sas-dir-mode-map "\C-m" #'sas-goto-dataset) + (define-key sas-dir-mode-map [mouse-2] #'sas-mouse-goto-dataset) + (define-key sas-dir-mode-map "t" #'sas-dir-goto-page) + (define-key sas-dir-mode-map "q" #'bury-buffer) + (define-key sas-dir-mode-map "g" #'sas-revert-library) + (define-key sas-dir-mode-map "1" #'digit-argument) + (define-key sas-dir-mode-map "2" #'digit-argument) + (define-key sas-dir-mode-map "3" #'digit-argument) + (define-key sas-dir-mode-map "4" #'digit-argument) + (define-key sas-dir-mode-map "5" #'digit-argument) + (define-key sas-dir-mode-map "6" #'digit-argument) + (define-key sas-dir-mode-map "7" #'digit-argument) + (define-key sas-dir-mode-map "8" #'digit-argument) + (define-key sas-dir-mode-map "9" #'digit-argument) (define-key sas-dir-mode-map [menu-bar sas run] '("Submit File " . submit-sas)) ) @@ -1602,9 +1602,9 @@ page ; ;;(forward-line arg) ;;(sas-move-to-filename sas-dir-buf-end))) -(defun sas-prev-line (arg) +(defun sas-prev-line (&optional _arg) "Move up one line." - (interactive "p") + (interactive) (beginning-of-line) (re-search-backward "^ *[0-9]+ *<*[^:0-9\n]" (point-min) t) (sas-move-to-filename sas-dir-buf-end)) @@ -1795,11 +1795,11 @@ whose beginning matches the regexp `page-delimiter'." str))) -(defun ess-imenu-SAS (&optional arg) +(defun ess-imenu-SAS (&optional _arg) "SAS language Imenu support for ESS." (interactive) (setq imenu-generic-expression - '( (nil "[ \t\n=]\\([a-zA-Z_][a-zA-Z_0-9]*[.][a-zA-Z_][a-zA-Z_0-9]*\\)[ ,()\t\n;]" 1))) + '( (nil "[ \t\n=]\\([[:alpha:]_][[:alnum:]_]*[.][[:alpha:]_][[:alnum:]_]*\\)[ ,()\t\n;]" 1))) (imenu-add-to-menubar "SAS Datasets")) ;;(defun sas-revert-library () |
