FUNCTION does not have arguments."
(or (listp modes) (setq modes (list modes)))
(mode-local-map-file-buffers
- function #'(lambda ()
- (let ((mm (mode-local-equivalent-mode-p major-mode))
- (ans nil))
- (while (and (not ans) mm)
- (setq ans (memq (car mm) modes)
- mm (cdr mm)) )
- ans))))
+ function (lambda ()
+ (let ((mm (mode-local-equivalent-mode-p major-mode))
+ (ans nil))
+ (while (and (not ans) mm)
+ (setq ans (memq (car mm) modes)
+ mm (cdr mm)) )
+ ans))))
\f
;;; Hook machinery
;;
(dolist (mode modes)
(when (setq table (get mode 'mode-local-symbol-table))
(mapatoms
- #'(lambda (var)
- (when (get var 'mode-variable-flag)
- (let ((v (intern (symbol-name var))))
- ;; Save the current buffer-local value of the
- ;; mode-local variable.
- (and (local-variable-p v (current-buffer))
- (push (cons v (symbol-value v)) old-locals))
- (set (make-local-variable v) (symbol-value var)))))
+ (lambda (var)
+ (when (get var 'mode-variable-flag)
+ (let ((v (intern (symbol-name var))))
+ ;; Save the current buffer-local value of the
+ ;; mode-local variable.
+ (and (local-variable-p v (current-buffer))
+ (push (cons v (symbol-value v)) old-locals))
+ (set (make-local-variable v) (symbol-value var)))))
table)))
old-locals)))
(while mode
(when (setq table (get mode 'mode-local-symbol-table))
(mapatoms
- #'(lambda (var)
- (when (get var 'mode-variable-flag)
- (kill-local-variable (intern (symbol-name var)))))
+ (lambda (var)
+ (when (get var 'mode-variable-flag)
+ (kill-local-variable (intern (symbol-name var)))))
table))
(setq mode (get-mode-local-parent mode)))))
;; Save mode bindings
(mode-local-bind (list ,@bl) '(mode-variable-flag t) ',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
,tmp)
)))
(interactive
(list (completing-read
"Mode: " obarray
- #'(lambda (s) (get s 'mode-local-symbol-table))
+ (lambda (s) (get s 'mode-local-symbol-table))
t (symbol-name major-mode))))
(when (setq mode (intern-soft mode))
(mode-local-describe-bindings-1 mode (called-interactively-p 'any))))
(if tag
(if (car tag)
(setq tag (mapcar
- #'(lambda (tag)
- ;; Set the 'reparse-symbol property to
- ;; NONTERM unless it was already setup
- ;; by a tag expander
- (or (semantic--tag-get-property
- tag 'reparse-symbol)
- (semantic--tag-put-property
- tag 'reparse-symbol nonterm))
- tag)
+ (lambda (tag)
+ ;; Set the 'reparse-symbol property to
+ ;; NONTERM unless it was already setup
+ ;; by a tag expander
+ (or (semantic--tag-get-property
+ tag 'reparse-symbol)
+ (semantic--tag-put-property
+ tag 'reparse-symbol nonterm))
+ tag)
(semantic--tag-expand tag))
result (append result tag))
;; No error in this case, a purposeful nil means don't
(if (obarrayp semantic-lex-spp-project-macro-symbol-obarray)
(let ((macros nil))
(mapatoms
- #'(lambda (symbol)
- (setq macros (cons symbol macros)))
+ (lambda (symbol)
+ (setq macros (cons symbol macros)))
semantic-lex-spp-project-macro-symbol-obarray)
(dolist (S macros)
(princ " ")
(insert-file-contents B)
(let ((ans nil)
(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
(setq ans (list B (ebrowse-read)))
;; These items must always happen
(interactive
(list (completing-read
"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))))
;; First, make sure the version is ok.
(when (overlay-get (car ol) 'semantic-change)
(setq ret (cons (car ol) ret)))
(setq ol (cdr ol)))
- (sort ret #'(lambda (a b) (< (overlay-start a)
- (overlay-start b)))))))
+ (sort ret (lambda (a b) (< (overlay-start a)
+ (overlay-start b)))))))
(defun semantic-edits-change-function-handle-changes (start end _length)
"Run whenever a buffer controlled by `semantic-mode' change.
(mode-local-bind
;; Add the semantic- prefix to OVERLOAD short names.
(mapcar
- #'(lambda (e)
- (let ((name (symbol-name (car e))))
- (if (string-match "^semantic-" name)
- e
- (cons (intern (format "semantic-%s" name)) (cdr e)))))
+ (lambda (e)
+ (let ((name (symbol-name (car e))))
+ (if (string-match "^semantic-" name)
+ e
+ (cons (intern (format "semantic-%s" name)) (cdr e)))))
overrides)
(list 'constant-flag (not transient)
'override-flag t)))
ARGS are ASSOC's key value list."
(let ((key t))
`(semantic-tag-make-plist
- ,@(mapcar #'(lambda (i)
- (prog1
- (if key
- (list 'quote i)
- i)
- (setq key (not key))))
+ ,@(mapcar (lambda (i)
+ (prog1
+ (if key
+ (list 'quote i)
+ i)
+ (setq key (not key))))
args))))
(defsubst semantic-grammar-quote-p (sym)
class (current-buffer))))
(apply #'append
(mapcar
- #'(lambda (tag)
- (mapcar
- #'intern
- (cons (semantic-tag-name tag)
- (semantic-tag-get-attribute tag :rest))))
+ (lambda (tag)
+ (mapcar
+ #'intern
+ (cons (semantic-tag-name tag)
+ (semantic-tag-get-attribute tag :rest))))
tags))))
(defsubst semantic-grammar-item-text (item)
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."
(mapcar
- #'(lambda (key)
- (cons (semantic-tag-get-attribute key :value)
- (intern (semantic-tag-name key))))
+ (lambda (key)
+ (cons (semantic-tag-get-attribute key :value)
+ (intern (semantic-tag-name key))))
(semantic-find-tags-by-class 'keyword (current-buffer))))
(defun semantic-grammar-keyword-properties (keywords)
(setq semantic--grammar-macros-regexp-1
(concat "(\\s-*"
(regexp-opt
- (mapcar #'(lambda (e) (symbol-name (car e)))
+ (mapcar (lambda (e) (symbol-name (car e)))
semantic-grammar-macros)
t)
"\\>"))
(setq label "Keyword: ")
(let (summary)
(semantic--find-tags-by-function
- #'(lambda (put)
- (unless summary
- (setq summary (cdr (assoc "summary"
- (semantic-tag-get-attribute
- put :value))))))
+ (lambda (put)
+ (unless summary
+ (setq summary (cdr (assoc "summary"
+ (semantic-tag-get-attribute
+ put :value))))))
;; Get `put' tag with TAG name.
(semantic-find-tags-by-name-regexp
(regexp-quote (semantic-tag-name tag))
(let* ((inhibit-quit nil)
(buffers (delq (current-buffer)
(delq nil
- (mapcar #'(lambda (b)
- (and (buffer-file-name b)
- b))
+ (mapcar (lambda (b)
+ (and (buffer-file-name b)
+ b))
(buffer-list)))))
;; safe ;; This safe is not used, but could be.
others
(cb (current-buffer))
(buffers (delq (current-buffer)
(delq nil
- (mapcar #'(lambda (b)
- (and (buffer-file-name b)
- b))
+ (mapcar (lambda (b)
+ (and (buffer-file-name b)
+ b))
(buffer-list)))))
safe) ;; errbuf
;; First, handle long tasks in the current buffer.
Clears all imenu menus that may be depending on the database."
(require 'semantic/db-mode)
(semantic-map-buffers
- #'(lambda ()
- ;; Set up semanticdb environment if enabled.
- (if (semanticdb-minor-mode-p)
- (semanticdb-semantic-init-hook-fcn))
- ;; Clear imenu cache to redraw the imenu.
- (semantic-imenu-flush-fcn))))
+ (lambda ()
+ ;; Set up semanticdb environment if enabled.
+ (if (semanticdb-minor-mode-p)
+ (semanticdb-semantic-init-hook-fcn))
+ ;; Clear imenu cache to redraw the imenu.
+ (semantic-imenu-flush-fcn))))
(add-hook 'semanticdb-mode-hook #'semantic-imenu-semanticdb-hook)
removed from the result list."
(delq nil
(mapcar
- #'(lambda (k)
- (let* ((tag (semantic-java-doc-tag k))
- (plist (semantic-lex-keyword-get tag 'javadoc)))
- (if (or (not property) (plist-get plist property))
- (funcall fun k plist))))
+ (lambda (k)
+ (let* ((tag (semantic-java-doc-tag k))
+ (plist (semantic-lex-keyword-get tag 'javadoc)))
+ (if (or (not property) (plist-get plist property))
+ (funcall fun k plist))))
semantic-java-doc-line-tags)))
\f
(or semantic-java-doc-with-name-tags
(setq semantic-java-doc-with-name-tags
(semantic-java-doc-keywords-map
- #'(lambda (k _p) k)
+ (lambda (k _p) k)
'with-name)))
(or semantic-java-doc-with-ref-tags
(setq semantic-java-doc-with-ref-tags
(semantic-java-doc-keywords-map
- #'(lambda (k _p) k)
+ (lambda (k _p) k)
'with-ref)))
(or semantic-java-doc-extra-type-tags
(setq semantic-java-doc-extra-type-tags
(semantic-java-doc-keywords-map
- #'(lambda (k p)
- (if (memq 'type (plist-get p 'usage))
- k))
+ (lambda (k p)
+ (if (memq 'type (plist-get p 'usage))
+ k))
'opt)))
(or semantic-java-doc-extra-function-tags
(setq semantic-java-doc-extra-function-tags
(semantic-java-doc-keywords-map
- #'(lambda (k p)
- (if (memq 'function (plist-get p 'usage))
- k))
+ (lambda (k p)
+ (if (memq 'function (plist-get p 'usage))
+ k))
'opt)))
(or semantic-java-doc-extra-variable-tags
(setq semantic-java-doc-extra-variable-tags
(semantic-java-doc-keywords-map
- #'(lambda (k p)
- (if (memq 'variable (plist-get p 'usage))
- k))
+ (lambda (k p)
+ (if (memq 'variable (plist-get p 'usage))
+ k))
'opt)))
(or semantic-java-doc-type-tags
(setq semantic-java-doc-type-tags
(semantic-java-doc-keywords-map
- #'(lambda (k p)
- (if (memq 'type (plist-get p 'usage))
- k)))))
+ (lambda (k p)
+ (if (memq 'type (plist-get p 'usage))
+ k)))))
(or semantic-java-doc-function-tags
(setq semantic-java-doc-function-tags
(semantic-java-doc-keywords-map
- #'(lambda (k p)
- (if (memq 'function (plist-get p 'usage))
- k)))))
+ (lambda (k p)
+ (if (memq 'function (plist-get p 'usage))
+ k)))))
(or semantic-java-doc-variable-tags
(setq semantic-java-doc-variable-tags
(semantic-java-doc-keywords-map
- #'(lambda (k p)
- (if (memq 'variable (plist-get p 'usage))
- k)))))
+ (lambda (k p)
+ (if (memq 'variable (plist-get p 'usage))
+ k)))))
)
(let (macros)
(when (obarrayp semantic-lex-spp-dynamic-macro-symbol-obarray)
(mapatoms
- #'(lambda (symbol)
- (setq macros (cons (cons (symbol-name symbol)
- (symbol-value symbol))
- macros)))
+ (lambda (symbol)
+ (setq macros (cons (cons (symbol-name symbol)
+ (symbol-value symbol))
+ macros)))
semantic-lex-spp-dynamic-macro-symbol-obarray))
macros))
(let (macros)
(when (obarrayp semantic-lex-spp-macro-symbol-obarray)
(mapatoms
- #'(lambda (symbol)
- (setq macros (cons symbol macros)))
+ (lambda (symbol)
+ (setq macros (cons symbol macros)))
semantic-lex-spp-macro-symbol-obarray))
(when (obarrayp semantic-lex-spp-project-macro-symbol-obarray)
(mapatoms
- #'(lambda (symbol)
- (setq macros (cons symbol macros)))
+ (lambda (symbol)
+ (setq macros (cons symbol macros)))
semantic-lex-spp-project-macro-symbol-obarray))
(when (obarrayp semantic-lex-spp-dynamic-macro-symbol-obarray)
(mapatoms
- #'(lambda (symbol)
- (setq macros (cons symbol macros)))
+ (lambda (symbol)
+ (setq macros (cons symbol macros)))
semantic-lex-spp-dynamic-macro-symbol-obarray))
macros))
as a PROPERTY value. FUN receives a symbol as argument."
(if (obarrayp table)
(mapatoms
- #'(lambda (symbol)
- (if (or (null property) (get symbol property))
- (funcall fun symbol)))
+ (lambda (symbol)
+ (if (or (null property) (get symbol property))
+ (funcall fun symbol)))
table)))
;;; Lexical keyword table handling.
PROPERTY set."
(let (keywords)
(semantic-lex-map-keywords
- #'(lambda (symbol) (setq keywords (cons symbol keywords)))
+ (lambda (symbol) (setq keywords (cons symbol keywords)))
property)
keywords))
PROPERTY set."
(let (types)
(semantic-lex-map-types
- #'(lambda (symbol) (setq types (cons symbol types)))
+ (lambda (symbol) (setq types (cons symbol types)))
property)
types))
\f
;; Update the minor mode format.
(semantic-mode-line-update)
;; 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))))
\f
;;;;
;;;; Minor mode to highlight areas that a user edits.
"Define a context NAME that will bind variables VARS."
(declare (indent 1))
(let* ((context (wisent-context-name name))
- (declarations (mapcar #'(lambda (v) (list 'defvar v)) vars)))
+ (declarations (mapcar (lambda (v) (list 'defvar v)) vars)))
`(progn
,@declarations
(eval-when-compile
;; in local variable OBN.
,@(let (obcode)
(mapatoms
- #'(lambda (s)
- (setq obcode
- (cons `(fset (intern ,(symbol-name s) ,obn)
- #',(symbol-function s))
- obcode)))
+ (lambda (s)
+ (setq obcode
+ (cons `(fset (intern ,(symbol-name s) ,obn)
+ #',(symbol-function s))
+ obcode)))
obv)
obcode)
;; Generate code to create the automaton.
,@(mapcar
;; Use name `st' rather than `state' since `state' is
;; defined as dynbound in `semantic-actions' context above :-( !
- #'(lambda (st) ;; for each state
- `(list
- ,@(mapcar
- #'(lambda (tr) ;; for each transition
- (let ((k (car tr)) ; token
- (a (cdr tr))) ; action
- (if (and (symbolp a)
- (intern-soft (symbol-name a) obv))
- `(cons ,(if (symbolp k) `(quote ,k) k)
- (intern-soft ,(symbol-name a) ,obn))
- `(quote ,tr))))
- st)))
+ (lambda (st) ;; for each state
+ `(list
+ ,@(mapcar
+ (lambda (tr) ;; for each transition
+ (let ((k (car tr)) ; token
+ (a (cdr tr))) ; action
+ (if (and (symbolp a)
+ (intern-soft (symbol-name a) obv))
+ `(cons ,(if (symbolp k) `(quote ,k) k)
+ (intern-soft ,(symbol-name a) ,obn))
+ `(quote ,tr))))
+ st)))
(aref automaton 0)))
;; The code of the goto table is unchanged.
,(aref automaton 1)
(defun wisent-grammar-assocs ()
"Return associativity and precedence level definitions."
(mapcar
- #'(lambda (tag)
- (cons (intern (semantic-tag-name tag))
- (mapcar #'semantic-grammar-item-value
- (semantic-tag-get-attribute tag :value))))
+ (lambda (tag)
+ (cons (intern (semantic-tag-name tag))
+ (mapcar #'semantic-grammar-item-value
+ (semantic-tag-get-attribute tag :value))))
(semantic-find-tags-by-class 'assoc (current-buffer))))
(defun wisent-grammar-terminals ()
Keep order of declaration in the WY file without duplicates."
(let (terms)
(mapc
- #'(lambda (tag)
- (mapcar #'(lambda (name)
- (add-to-list 'terms (intern name)))
- (cons (semantic-tag-name tag)
- (semantic-tag-get-attribute tag :rest))))
+ (lambda (tag)
+ (mapcar (lambda (name)
+ (add-to-list 'terms (intern name)))
+ (cons (semantic-tag-name tag)
+ (semantic-tag-get-attribute tag :rest))))
(semantic--find-tags-by-function
- #'(lambda (tag)
- (memq (semantic-tag-class tag) '(token keyword)))
+ (lambda (tag)
+ (memq (semantic-tag-class tag) '(token keyword)))
(current-buffer)))
(nreverse terms)))