1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 09:00:31 -08:00

Remove redundant #' before lambda in cedet

* lisp/cedet/mode-local.el (mode-local-map-mode-buffers)
(mode-local--activate-bindings, mode-local--deactivate-bindings)
(setq-mode-local, describe-mode-local-bindings-in-mode):
* lisp/cedet/semantic.el (semantic-repeat-parse-whole-stream):
* lisp/cedet/semantic/bovine/c.el (semantic-c-describe-environment):
* lisp/cedet/semantic/db-ebrowse.el
(semanticdb-ebrowse-get-ebrowse-structure):
* lisp/cedet/semantic/db-global.el
(semanticdb-enable-gnu-global-databases):
* lisp/cedet/semantic/edit.el (semantic-changes-in-region):
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
* lisp/cedet/semantic/grammar.el (semantic-grammar-ASSOC)
(semantic-grammar-tag-symbols, semantic-grammar-keywords)
(semantic--grammar-macros-regexp-1)
(semantic-format-tag-summarize):
* lisp/cedet/semantic/idle.el (semantic-idle-core-handler)
(semantic-idle-work-core-handler):
* lisp/cedet/semantic/imenu.el (semantic-imenu-semanticdb-hook):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map)
(semantic-java-doc-setup):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-save-table)
(semantic-lex-spp-macros):
* lisp/cedet/semantic/lex.el (semantic-lex-map-symbols)
(semantic-lex-keywords, semantic-lex-types):
* lisp/cedet/semantic/util-modes.el
(semantic-toggle-minor-mode-globally):
* lisp/cedet/semantic/wisent/comp.el (wisent-defcontext)
(wisent-automaton-lisp-form):
* lisp/cedet/semantic/wisent/grammar.el (wisent-grammar-assocs)
(wisent-grammar-terminals): Remove redundant #' before lambda.
This commit is contained in:
Stefan Kangas 2021-03-30 23:44:48 +02:00
parent 3c00496baa
commit 63608efe7e
16 changed files with 142 additions and 142 deletions

View file

@ -91,13 +91,13 @@ MODES can be a symbol or a list of symbols.
FUNCTION does not have arguments." FUNCTION does not have arguments."
(or (listp modes) (setq modes (list modes))) (or (listp modes) (setq modes (list modes)))
(mode-local-map-file-buffers (mode-local-map-file-buffers
function #'(lambda () function (lambda ()
(let ((mm (mode-local-equivalent-mode-p major-mode)) (let ((mm (mode-local-equivalent-mode-p major-mode))
(ans nil)) (ans nil))
(while (and (not ans) mm) (while (and (not ans) mm)
(setq ans (memq (car mm) modes) (setq ans (memq (car mm) modes)
mm (cdr mm)) ) mm (cdr mm)) )
ans)))) ans))))
;;; Hook machinery ;;; Hook machinery
;; ;;
@ -323,14 +323,14 @@ Elements are (SYMBOL . PREVIOUS-VALUE), describing one variable."
(dolist (mode modes) (dolist (mode modes)
(when (setq table (get mode 'mode-local-symbol-table)) (when (setq table (get mode 'mode-local-symbol-table))
(mapatoms (mapatoms
#'(lambda (var) (lambda (var)
(when (get var 'mode-variable-flag) (when (get var 'mode-variable-flag)
(let ((v (intern (symbol-name var)))) (let ((v (intern (symbol-name var))))
;; Save the current buffer-local value of the ;; Save the current buffer-local value of the
;; mode-local variable. ;; mode-local variable.
(and (local-variable-p v (current-buffer)) (and (local-variable-p v (current-buffer))
(push (cons v (symbol-value v)) old-locals)) (push (cons v (symbol-value v)) old-locals))
(set (make-local-variable v) (symbol-value var))))) (set (make-local-variable v) (symbol-value var)))))
table))) table)))
old-locals))) old-locals)))
@ -348,9 +348,9 @@ If MODE is not specified it defaults to current `major-mode'."
(while mode (while mode
(when (setq table (get mode 'mode-local-symbol-table)) (when (setq table (get mode 'mode-local-symbol-table))
(mapatoms (mapatoms
#'(lambda (var) (lambda (var)
(when (get var 'mode-variable-flag) (when (get var 'mode-variable-flag)
(kill-local-variable (intern (symbol-name var))))) (kill-local-variable (intern (symbol-name var)))))
table)) table))
(setq mode (get-mode-local-parent mode))))) (setq mode (get-mode-local-parent mode)))))
@ -428,7 +428,7 @@ Return the value of the last VAL."
;; Save mode bindings ;; Save mode bindings
(mode-local-bind (list ,@bl) '(mode-variable-flag t) ',mode) (mode-local-bind (list ,@bl) '(mode-variable-flag t) ',mode)
;; Assign to local variables in all existing buffers in MODE ;; Assign to local variables in all existing buffers in MODE
(mode-local-map-mode-buffers #'(lambda () ,@sl) ',mode) (mode-local-map-mode-buffers (lambda () ,@sl) ',mode)
;; Return the last value ;; Return the last value
,tmp) ,tmp)
))) )))
@ -893,7 +893,7 @@ invoked interactively."
(interactive (interactive
(list (completing-read (list (completing-read
"Mode: " obarray "Mode: " obarray
#'(lambda (s) (get s 'mode-local-symbol-table)) (lambda (s) (get s 'mode-local-symbol-table))
t (symbol-name major-mode)))) t (symbol-name major-mode))))
(when (setq mode (intern-soft mode)) (when (setq mode (intern-soft mode))
(mode-local-describe-bindings-1 mode (called-interactively-p 'any)))) (mode-local-describe-bindings-1 mode (called-interactively-p 'any))))

View file

@ -678,15 +678,15 @@ This function returns semantic tags without overlays."
(if tag (if tag
(if (car tag) (if (car tag)
(setq tag (mapcar (setq tag (mapcar
#'(lambda (tag) (lambda (tag)
;; Set the 'reparse-symbol property to ;; Set the 'reparse-symbol property to
;; NONTERM unless it was already setup ;; NONTERM unless it was already setup
;; by a tag expander ;; by a tag expander
(or (semantic--tag-get-property (or (semantic--tag-get-property
tag 'reparse-symbol) tag 'reparse-symbol)
(semantic--tag-put-property (semantic--tag-put-property
tag 'reparse-symbol nonterm)) tag 'reparse-symbol nonterm))
tag) tag)
(semantic--tag-expand tag)) (semantic--tag-expand tag))
result (append result tag)) result (append result tag))
;; No error in this case, a purposeful nil means don't ;; No error in this case, a purposeful nil means don't

View file

@ -2244,8 +2244,8 @@ actually in their parent which is not accessible.")
(if (obarrayp semantic-lex-spp-project-macro-symbol-obarray) (if (obarrayp semantic-lex-spp-project-macro-symbol-obarray)
(let ((macros nil)) (let ((macros nil))
(mapatoms (mapatoms
#'(lambda (symbol) (lambda (symbol)
(setq macros (cons symbol macros))) (setq macros (cons symbol macros)))
semantic-lex-spp-project-macro-symbol-obarray) semantic-lex-spp-project-macro-symbol-obarray)
(dolist (S macros) (dolist (S macros)
(princ " ") (princ " ")

View file

@ -274,7 +274,7 @@ For instance: /home/<username>/.semanticdb/!usr!include!BROWSE"
(insert-file-contents B) (insert-file-contents B)
(let ((ans nil) (let ((ans nil)
(efcn (symbol-function 'ebrowse-show-progress))) (efcn (symbol-function 'ebrowse-show-progress)))
(fset 'ebrowse-show-progress #'(lambda (&rest _junk) nil)) (fset 'ebrowse-show-progress (lambda (&rest _junk) nil))
(unwind-protect ;; Protect against errors w/ ebrowse (unwind-protect ;; Protect against errors w/ ebrowse
(setq ans (list B (ebrowse-read))) (setq ans (list B (ebrowse-read)))
;; These items must always happen ;; These items must always happen

View file

@ -56,7 +56,7 @@ values."
(interactive (interactive
(list (completing-read (list (completing-read
"Enable in Mode: " obarray "Enable in Mode: " obarray
#'(lambda (s) (get s 'mode-local-symbol-table)) (lambda (s) (get s 'mode-local-symbol-table))
t (symbol-name major-mode)))) t (symbol-name major-mode))))
;; First, make sure the version is ok. ;; First, make sure the version is ok.

View file

@ -154,8 +154,8 @@ Optional argument BUFFER is the buffer to search for changes in."
(when (overlay-get (car ol) 'semantic-change) (when (overlay-get (car ol) 'semantic-change)
(setq ret (cons (car ol) ret))) (setq ret (cons (car ol) ret)))
(setq ol (cdr ol))) (setq ol (cdr ol)))
(sort ret #'(lambda (a b) (< (overlay-start a) (sort ret (lambda (a b) (< (overlay-start a)
(overlay-start b))))))) (overlay-start b)))))))
(defun semantic-edits-change-function-handle-changes (start end _length) (defun semantic-edits-change-function-handle-changes (start end _length)
"Run whenever a buffer controlled by `semantic-mode' change. "Run whenever a buffer controlled by `semantic-mode' change.

View file

@ -270,11 +270,11 @@ later installation should be done in MODE hook."
(mode-local-bind (mode-local-bind
;; Add the semantic- prefix to OVERLOAD short names. ;; Add the semantic- prefix to OVERLOAD short names.
(mapcar (mapcar
#'(lambda (e) (lambda (e)
(let ((name (symbol-name (car e)))) (let ((name (symbol-name (car e))))
(if (string-match "^semantic-" name) (if (string-match "^semantic-" name)
e e
(cons (intern (format "semantic-%s" name)) (cdr e))))) (cons (intern (format "semantic-%s" name)) (cdr e)))))
overrides) overrides)
(list 'constant-flag (not transient) (list 'constant-flag (not transient)
'override-flag t))) 'override-flag t)))

View file

@ -140,12 +140,12 @@ It ignores whitespaces, newlines and comments."
ARGS are ASSOC's key value list." ARGS are ASSOC's key value list."
(let ((key t)) (let ((key t))
`(semantic-tag-make-plist `(semantic-tag-make-plist
,@(mapcar #'(lambda (i) ,@(mapcar (lambda (i)
(prog1 (prog1
(if key (if key
(list 'quote i) (list 'quote i)
i) i)
(setq key (not key)))) (setq key (not key))))
args)))) args))))
(defsubst semantic-grammar-quote-p (sym) (defsubst semantic-grammar-quote-p (sym)
@ -190,11 +190,11 @@ That is tag names plus names defined in tag attribute `:rest'."
class (current-buffer)))) class (current-buffer))))
(apply #'append (apply #'append
(mapcar (mapcar
#'(lambda (tag) (lambda (tag)
(mapcar (mapcar
#'intern #'intern
(cons (semantic-tag-name tag) (cons (semantic-tag-name tag)
(semantic-tag-get-attribute tag :rest)))) (semantic-tag-get-attribute tag :rest))))
tags)))) tags))))
(defsubst semantic-grammar-item-text (item) (defsubst semantic-grammar-item-text (item)
@ -295,9 +295,9 @@ foo.by it is foo-by."
That is an alist of (VALUE . TOKEN) where VALUE is the string value of That is an alist of (VALUE . TOKEN) where VALUE is the string value of
the keyword and TOKEN is the terminal symbol identifying the keyword." the keyword and TOKEN is the terminal symbol identifying the keyword."
(mapcar (mapcar
#'(lambda (key) (lambda (key)
(cons (semantic-tag-get-attribute key :value) (cons (semantic-tag-get-attribute key :value)
(intern (semantic-tag-name key)))) (intern (semantic-tag-name key))))
(semantic-find-tags-by-class 'keyword (current-buffer)))) (semantic-find-tags-by-class 'keyword (current-buffer))))
(defun semantic-grammar-keyword-properties (keywords) (defun semantic-grammar-keyword-properties (keywords)
@ -1063,7 +1063,7 @@ See also the variable `semantic-grammar-file-regexp'."
(setq semantic--grammar-macros-regexp-1 (setq semantic--grammar-macros-regexp-1
(concat "(\\s-*" (concat "(\\s-*"
(regexp-opt (regexp-opt
(mapcar #'(lambda (e) (symbol-name (car e))) (mapcar (lambda (e) (symbol-name (car e)))
semantic-grammar-macros) semantic-grammar-macros)
t) t)
"\\>")) "\\>"))
@ -1856,11 +1856,11 @@ Optional argument COLOR determines if color is added to the text."
(setq label "Keyword: ") (setq label "Keyword: ")
(let (summary) (let (summary)
(semantic--find-tags-by-function (semantic--find-tags-by-function
#'(lambda (put) (lambda (put)
(unless summary (unless summary
(setq summary (cdr (assoc "summary" (setq summary (cdr (assoc "summary"
(semantic-tag-get-attribute (semantic-tag-get-attribute
put :value)))))) put :value))))))
;; Get `put' tag with TAG name. ;; Get `put' tag with TAG name.
(semantic-find-tags-by-name-regexp (semantic-find-tags-by-name-regexp
(regexp-quote (semantic-tag-name tag)) (regexp-quote (semantic-tag-name tag))

View file

@ -216,9 +216,9 @@ And also manages services that depend on tag values."
(let* ((inhibit-quit nil) (let* ((inhibit-quit nil)
(buffers (delq (current-buffer) (buffers (delq (current-buffer)
(delq nil (delq nil
(mapcar #'(lambda (b) (mapcar (lambda (b)
(and (buffer-file-name b) (and (buffer-file-name b)
b)) b))
(buffer-list))))) (buffer-list)))))
;; safe ;; This safe is not used, but could be. ;; safe ;; This safe is not used, but could be.
others others
@ -356,9 +356,9 @@ Uses `semantic-idle-work-for-on-buffer' to do the work."
(cb (current-buffer)) (cb (current-buffer))
(buffers (delq (current-buffer) (buffers (delq (current-buffer)
(delq nil (delq nil
(mapcar #'(lambda (b) (mapcar (lambda (b)
(and (buffer-file-name b) (and (buffer-file-name b)
b)) b))
(buffer-list))))) (buffer-list)))))
safe) ;; errbuf safe) ;; errbuf
;; First, handle long tasks in the current buffer. ;; First, handle long tasks in the current buffer.

View file

@ -429,12 +429,12 @@ Optional argument PARENT is a tag parent of STREAM."
Clears all imenu menus that may be depending on the database." Clears all imenu menus that may be depending on the database."
(require 'semantic/db-mode) (require 'semantic/db-mode)
(semantic-map-buffers (semantic-map-buffers
#'(lambda () (lambda ()
;; Set up semanticdb environment if enabled. ;; Set up semanticdb environment if enabled.
(if (semanticdb-minor-mode-p) (if (semanticdb-minor-mode-p)
(semanticdb-semantic-init-hook-fcn)) (semanticdb-semantic-init-hook-fcn))
;; Clear imenu cache to redraw the imenu. ;; Clear imenu cache to redraw the imenu.
(semantic-imenu-flush-fcn)))) (semantic-imenu-flush-fcn))))
(add-hook 'semanticdb-mode-hook #'semantic-imenu-semanticdb-hook) (add-hook 'semanticdb-mode-hook #'semantic-imenu-semanticdb-hook)

View file

@ -395,11 +395,11 @@ receives two arguments: the javadoc keyword and its associated
removed from the result list." removed from the result list."
(delq nil (delq nil
(mapcar (mapcar
#'(lambda (k) (lambda (k)
(let* ((tag (semantic-java-doc-tag k)) (let* ((tag (semantic-java-doc-tag k))
(plist (semantic-lex-keyword-get tag 'javadoc))) (plist (semantic-lex-keyword-get tag 'javadoc)))
(if (or (not property) (plist-get plist property)) (if (or (not property) (plist-get plist property))
(funcall fun k plist)))) (funcall fun k plist))))
semantic-java-doc-line-tags))) semantic-java-doc-line-tags)))
@ -417,59 +417,59 @@ removed from the result list."
(or semantic-java-doc-with-name-tags (or semantic-java-doc-with-name-tags
(setq semantic-java-doc-with-name-tags (setq semantic-java-doc-with-name-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k _p) k) (lambda (k _p) k)
'with-name))) 'with-name)))
(or semantic-java-doc-with-ref-tags (or semantic-java-doc-with-ref-tags
(setq semantic-java-doc-with-ref-tags (setq semantic-java-doc-with-ref-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k _p) k) (lambda (k _p) k)
'with-ref))) 'with-ref)))
(or semantic-java-doc-extra-type-tags (or semantic-java-doc-extra-type-tags
(setq semantic-java-doc-extra-type-tags (setq semantic-java-doc-extra-type-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k p) (lambda (k p)
(if (memq 'type (plist-get p 'usage)) (if (memq 'type (plist-get p 'usage))
k)) k))
'opt))) 'opt)))
(or semantic-java-doc-extra-function-tags (or semantic-java-doc-extra-function-tags
(setq semantic-java-doc-extra-function-tags (setq semantic-java-doc-extra-function-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k p) (lambda (k p)
(if (memq 'function (plist-get p 'usage)) (if (memq 'function (plist-get p 'usage))
k)) k))
'opt))) 'opt)))
(or semantic-java-doc-extra-variable-tags (or semantic-java-doc-extra-variable-tags
(setq semantic-java-doc-extra-variable-tags (setq semantic-java-doc-extra-variable-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k p) (lambda (k p)
(if (memq 'variable (plist-get p 'usage)) (if (memq 'variable (plist-get p 'usage))
k)) k))
'opt))) 'opt)))
(or semantic-java-doc-type-tags (or semantic-java-doc-type-tags
(setq semantic-java-doc-type-tags (setq semantic-java-doc-type-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k p) (lambda (k p)
(if (memq 'type (plist-get p 'usage)) (if (memq 'type (plist-get p 'usage))
k))))) k)))))
(or semantic-java-doc-function-tags (or semantic-java-doc-function-tags
(setq semantic-java-doc-function-tags (setq semantic-java-doc-function-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k p) (lambda (k p)
(if (memq 'function (plist-get p 'usage)) (if (memq 'function (plist-get p 'usage))
k))))) k)))))
(or semantic-java-doc-variable-tags (or semantic-java-doc-variable-tags
(setq semantic-java-doc-variable-tags (setq semantic-java-doc-variable-tags
(semantic-java-doc-keywords-map (semantic-java-doc-keywords-map
#'(lambda (k p) (lambda (k p)
(if (memq 'variable (plist-get p 'usage)) (if (memq 'variable (plist-get p 'usage))
k))))) k)))))
) )

View file

@ -278,10 +278,10 @@ The return list is meant to be saved in a semanticdb table."
(let (macros) (let (macros)
(when (obarrayp semantic-lex-spp-dynamic-macro-symbol-obarray) (when (obarrayp semantic-lex-spp-dynamic-macro-symbol-obarray)
(mapatoms (mapatoms
#'(lambda (symbol) (lambda (symbol)
(setq macros (cons (cons (symbol-name symbol) (setq macros (cons (cons (symbol-name symbol)
(symbol-value symbol)) (symbol-value symbol))
macros))) macros)))
semantic-lex-spp-dynamic-macro-symbol-obarray)) semantic-lex-spp-dynamic-macro-symbol-obarray))
macros)) macros))
@ -291,18 +291,18 @@ The value of each symbol is the replacement stream."
(let (macros) (let (macros)
(when (obarrayp semantic-lex-spp-macro-symbol-obarray) (when (obarrayp semantic-lex-spp-macro-symbol-obarray)
(mapatoms (mapatoms
#'(lambda (symbol) (lambda (symbol)
(setq macros (cons symbol macros))) (setq macros (cons symbol macros)))
semantic-lex-spp-macro-symbol-obarray)) semantic-lex-spp-macro-symbol-obarray))
(when (obarrayp semantic-lex-spp-project-macro-symbol-obarray) (when (obarrayp semantic-lex-spp-project-macro-symbol-obarray)
(mapatoms (mapatoms
#'(lambda (symbol) (lambda (symbol)
(setq macros (cons symbol macros))) (setq macros (cons symbol macros)))
semantic-lex-spp-project-macro-symbol-obarray)) semantic-lex-spp-project-macro-symbol-obarray))
(when (obarrayp semantic-lex-spp-dynamic-macro-symbol-obarray) (when (obarrayp semantic-lex-spp-dynamic-macro-symbol-obarray)
(mapatoms (mapatoms
#'(lambda (symbol) (lambda (symbol)
(setq macros (cons symbol macros))) (setq macros (cons symbol macros)))
semantic-lex-spp-dynamic-macro-symbol-obarray)) semantic-lex-spp-dynamic-macro-symbol-obarray))
macros)) macros))

View file

@ -192,9 +192,9 @@ If optional PROPERTY is non-nil, call FUN only on every symbol which
as a PROPERTY value. FUN receives a symbol as argument." as a PROPERTY value. FUN receives a symbol as argument."
(if (obarrayp table) (if (obarrayp table)
(mapatoms (mapatoms
#'(lambda (symbol) (lambda (symbol)
(if (or (null property) (get symbol property)) (if (or (null property) (get symbol property))
(funcall fun symbol))) (funcall fun symbol)))
table))) table)))
;;; Lexical keyword table handling. ;;; Lexical keyword table handling.
@ -286,7 +286,7 @@ If optional PROPERTY is non-nil, return only keywords which have a
PROPERTY set." PROPERTY set."
(let (keywords) (let (keywords)
(semantic-lex-map-keywords (semantic-lex-map-keywords
#'(lambda (symbol) (setq keywords (cons symbol keywords))) (lambda (symbol) (setq keywords (cons symbol keywords)))
property) property)
keywords)) keywords))
@ -462,7 +462,7 @@ If optional PROPERTY is non-nil, return only type symbols which have
PROPERTY set." PROPERTY set."
(let (types) (let (types)
(semantic-lex-map-types (semantic-lex-map-types
#'(lambda (symbol) (setq types (cons symbol types))) (lambda (symbol) (setq types (cons symbol types)))
property) property)
types)) types))

View file

@ -162,7 +162,7 @@ too an interactive function used to toggle the mode."
;; Update the minor mode format. ;; Update the minor mode format.
(semantic-mode-line-update) (semantic-mode-line-update)
;; Then turn MODE on or off in every Semantic enabled buffer. ;; Then turn MODE on or off in every Semantic enabled buffer.
(semantic-map-buffers #'(lambda () (funcall mode arg)))) (semantic-map-buffers (lambda () (funcall mode arg))))
;;;; ;;;;
;;;; Minor mode to highlight areas that a user edits. ;;;; Minor mode to highlight areas that a user edits.

View file

@ -66,7 +66,7 @@
"Define a context NAME that will bind variables VARS." "Define a context NAME that will bind variables VARS."
(declare (indent 1)) (declare (indent 1))
(let* ((context (wisent-context-name name)) (let* ((context (wisent-context-name name))
(declarations (mapcar #'(lambda (v) (list 'defvar v)) vars))) (declarations (mapcar (lambda (v) (list 'defvar v)) vars)))
`(progn `(progn
,@declarations ,@declarations
(eval-when-compile (eval-when-compile
@ -3485,11 +3485,11 @@ See also `wisent-compile-grammar' for more details on AUTOMATON."
;; in local variable OBN. ;; in local variable OBN.
,@(let (obcode) ,@(let (obcode)
(mapatoms (mapatoms
#'(lambda (s) (lambda (s)
(setq obcode (setq obcode
(cons `(fset (intern ,(symbol-name s) ,obn) (cons `(fset (intern ,(symbol-name s) ,obn)
#',(symbol-function s)) #',(symbol-function s))
obcode))) obcode)))
obv) obv)
obcode) obcode)
;; Generate code to create the automaton. ;; Generate code to create the automaton.
@ -3501,18 +3501,18 @@ See also `wisent-compile-grammar' for more details on AUTOMATON."
,@(mapcar ,@(mapcar
;; Use name `st' rather than `state' since `state' is ;; Use name `st' rather than `state' since `state' is
;; defined as dynbound in `semantic-actions' context above :-( ! ;; defined as dynbound in `semantic-actions' context above :-( !
#'(lambda (st) ;; for each state (lambda (st) ;; for each state
`(list `(list
,@(mapcar ,@(mapcar
#'(lambda (tr) ;; for each transition (lambda (tr) ;; for each transition
(let ((k (car tr)) ; token (let ((k (car tr)) ; token
(a (cdr tr))) ; action (a (cdr tr))) ; action
(if (and (symbolp a) (if (and (symbolp a)
(intern-soft (symbol-name a) obv)) (intern-soft (symbol-name a) obv))
`(cons ,(if (symbolp k) `(quote ,k) k) `(cons ,(if (symbolp k) `(quote ,k) k)
(intern-soft ,(symbol-name a) ,obn)) (intern-soft ,(symbol-name a) ,obn))
`(quote ,tr)))) `(quote ,tr))))
st))) st)))
(aref automaton 0))) (aref automaton 0)))
;; The code of the goto table is unchanged. ;; The code of the goto table is unchanged.
,(aref automaton 1) ,(aref automaton 1)

View file

@ -198,10 +198,10 @@ See also the function `wisent-skip-token'."
(defun wisent-grammar-assocs () (defun wisent-grammar-assocs ()
"Return associativity and precedence level definitions." "Return associativity and precedence level definitions."
(mapcar (mapcar
#'(lambda (tag) (lambda (tag)
(cons (intern (semantic-tag-name tag)) (cons (intern (semantic-tag-name tag))
(mapcar #'semantic-grammar-item-value (mapcar #'semantic-grammar-item-value
(semantic-tag-get-attribute tag :value)))) (semantic-tag-get-attribute tag :value))))
(semantic-find-tags-by-class 'assoc (current-buffer)))) (semantic-find-tags-by-class 'assoc (current-buffer))))
(defun wisent-grammar-terminals () (defun wisent-grammar-terminals ()
@ -209,14 +209,14 @@ See also the function `wisent-skip-token'."
Keep order of declaration in the WY file without duplicates." Keep order of declaration in the WY file without duplicates."
(let (terms) (let (terms)
(mapc (mapc
#'(lambda (tag) (lambda (tag)
(mapcar #'(lambda (name) (mapcar (lambda (name)
(add-to-list 'terms (intern name))) (add-to-list 'terms (intern name)))
(cons (semantic-tag-name tag) (cons (semantic-tag-name tag)
(semantic-tag-get-attribute tag :rest)))) (semantic-tag-get-attribute tag :rest))))
(semantic--find-tags-by-function (semantic--find-tags-by-function
#'(lambda (tag) (lambda (tag)
(memq (semantic-tag-class tag) '(token keyword))) (memq (semantic-tag-class tag) '(token keyword)))
(current-buffer))) (current-buffer)))
(nreverse terms))) (nreverse terms)))