Function: srecode-map-update-file-entry

srecode-map-update-file-entry is a byte-compiled function defined in map.el.gz.

Signature

(srecode-map-update-file-entry ARG &rest ARGS)

Implementations

((map srecode-map) file mode) in `srecode/map.el'.

Update a MAP entry for FILE to be used with MODE. Return non-nil if the MAP was changed.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/map.el.gz
(cl-defmethod srecode-map-update-file-entry ((map srecode-map) file mode)
  "Update a MAP entry for FILE to be used with MODE.
Return non-nil if the MAP was changed."
  (let ((entry (srecode-map-entry-for-file map file))
	(dirty t))
    (cond
     ;; It is already a match.. do nothing.
     ((and entry (eq (cdr entry) mode))
      (setq dirty nil))
     ;; We have a non-matching entry.  Change the cdr.
     (entry
      (setcdr entry mode))
     ;; No entry, just add it to the list.
     (t
      (object-add-to-list map 'files (cons file mode))
      ))
    dirty))