Improve support for Scheme R6RS and R7RS libraries (bug#54704)
* etc/NEWS (Scheme mode): Document improved file-type auto-detection and Imenu support for R6RS and R7RS Scheme libraries. * lisp/files.el (auto-mode-alist): Associate the '.sls' (R6RS Scheme Library Source) and '.sld' (R7RS Scheme Library Definition) file name extensions with the Scheme mode. * lisp/progmodes/scheme.el (scheme-imenu-generic-expression): Make Imenu recognize the members nested (and so indented) inside of 'library' (R6RS) or 'define-library' (R7RS) forms.
This commit is contained in:
parent
2347f37f67
commit
1fe4b98b4d
3 changed files with 27 additions and 8 deletions
13
etc/NEWS
13
etc/NEWS
|
@ -3055,6 +3055,19 @@ name.
|
||||||
This key is now bound to 'Buffer-menu-view-other-window', which will
|
This key is now bound to 'Buffer-menu-view-other-window', which will
|
||||||
view this line's buffer in View mode in another window.
|
view this line's buffer in View mode in another window.
|
||||||
|
|
||||||
|
** Scheme mode
|
||||||
|
|
||||||
|
---
|
||||||
|
*** Auto-detection of Scheme library files.
|
||||||
|
Emacs now automatically enables the Scheme mode when opening R6RS
|
||||||
|
Scheme Library Source ('.sls') files and R7RS Scheme Library
|
||||||
|
Definition ('.sld') files.
|
||||||
|
|
||||||
|
---
|
||||||
|
*** Imenu members for R6RS and R7RS library members.
|
||||||
|
Imenu now lists the members directly nested in R6RS Scheme libraries
|
||||||
|
('library') and R7RS libraries ('define-library').
|
||||||
|
|
||||||
|
|
||||||
* New Modes and Packages in Emacs 29.1
|
* New Modes and Packages in Emacs 29.1
|
||||||
|
|
||||||
|
|
|
@ -2850,7 +2850,7 @@ since only a single case-insensitive search through the alist is made."
|
||||||
("\\.emacs-places\\'" . lisp-data-mode)
|
("\\.emacs-places\\'" . lisp-data-mode)
|
||||||
("\\.el\\'" . emacs-lisp-mode)
|
("\\.el\\'" . emacs-lisp-mode)
|
||||||
("Project\\.ede\\'" . emacs-lisp-mode)
|
("Project\\.ede\\'" . emacs-lisp-mode)
|
||||||
("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode)
|
("\\.\\(scm\\|sls\\|sld\\|stk\\|ss\\|sch\\)\\'" . scheme-mode)
|
||||||
("\\.l\\'" . lisp-mode)
|
("\\.l\\'" . lisp-mode)
|
||||||
("\\.li?sp\\'" . lisp-mode)
|
("\\.li?sp\\'" . lisp-mode)
|
||||||
("\\.[fF]\\'" . fortran-mode)
|
("\\.[fF]\\'" . fortran-mode)
|
||||||
|
|
|
@ -115,7 +115,8 @@
|
||||||
|
|
||||||
(defvar scheme-imenu-generic-expression
|
(defvar scheme-imenu-generic-expression
|
||||||
`((nil
|
`((nil
|
||||||
,(rx bol "(define"
|
,(rx bol (zero-or-more space)
|
||||||
|
"(define"
|
||||||
(zero-or-one "*")
|
(zero-or-one "*")
|
||||||
(zero-or-one "-public")
|
(zero-or-one "-public")
|
||||||
(one-or-more space)
|
(one-or-more space)
|
||||||
|
@ -123,36 +124,41 @@
|
||||||
(group (one-or-more (or word (syntax symbol)))))
|
(group (one-or-more (or word (syntax symbol)))))
|
||||||
1)
|
1)
|
||||||
("Methods"
|
("Methods"
|
||||||
,(rx bol "(define-"
|
,(rx bol (zero-or-more space)
|
||||||
|
"(define-"
|
||||||
(or "generic" "method" "accessor")
|
(or "generic" "method" "accessor")
|
||||||
(one-or-more space)
|
(one-or-more space)
|
||||||
(zero-or-one "(")
|
(zero-or-one "(")
|
||||||
(group (one-or-more (or word (syntax symbol)))))
|
(group (one-or-more (or word (syntax symbol)))))
|
||||||
1)
|
1)
|
||||||
("Classes"
|
("Classes"
|
||||||
,(rx bol "(define-class"
|
,(rx bol (zero-or-more space)
|
||||||
|
"(define-class"
|
||||||
(one-or-more space)
|
(one-or-more space)
|
||||||
(zero-or-one "(")
|
(zero-or-one "(")
|
||||||
(group (one-or-more (or word (syntax symbol)))))
|
(group (one-or-more (or word (syntax symbol)))))
|
||||||
1)
|
1)
|
||||||
("Records"
|
("Records"
|
||||||
,(rx bol "(define-record-type"
|
,(rx bol (zero-or-more space)
|
||||||
|
"(define-record-type"
|
||||||
(zero-or-one "*")
|
(zero-or-one "*")
|
||||||
(one-or-more space)
|
(one-or-more space)
|
||||||
(group (one-or-more (or word (syntax symbol)))))
|
(group (one-or-more (or word (syntax symbol)))))
|
||||||
1)
|
1)
|
||||||
("Conditions"
|
("Conditions"
|
||||||
,(rx bol "(define-condition-type"
|
,(rx bol (zero-or-more space)
|
||||||
|
"(define-condition-type"
|
||||||
(one-or-more space)
|
(one-or-more space)
|
||||||
(group (one-or-more (or word (syntax symbol)))))
|
(group (one-or-more (or word (syntax symbol)))))
|
||||||
1)
|
1)
|
||||||
("Modules"
|
("Modules"
|
||||||
,(rx bol "(define-module"
|
,(rx bol (zero-or-more space)
|
||||||
|
"(define-module"
|
||||||
(one-or-more space)
|
(one-or-more space)
|
||||||
(group "(" (one-or-more any) ")"))
|
(group "(" (one-or-more any) ")"))
|
||||||
1)
|
1)
|
||||||
("Macros"
|
("Macros"
|
||||||
,(rx bol "("
|
,(rx bol (zero-or-more space) "("
|
||||||
(or (and "defmacro"
|
(or (and "defmacro"
|
||||||
(zero-or-one "*")
|
(zero-or-one "*")
|
||||||
(zero-or-one "-public"))
|
(zero-or-one "-public"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue