Function: ede-update-version-in-source

ede-update-version-in-source is a byte-compiled function defined in proj-elisp.el.gz.

Signature

(ede-update-version-in-source ARG &rest ARGS)

Implementations

(ede-update-version-in-source (THIS ede-target) VERSION) in `ede/util.el'.

In sources for THIS, change version numbers to VERSION.

(ede-update-version-in-source (THIS ede-project) VERSION) in `ede/util.el'.

Change occurrences of a version string in sources. In project THIS, cycle over all targets to give them a chance to set their sources to VERSION.

(ede-update-version-in-source (THIS ede-proj-target-elisp-autoloads) VERSION) in `ede/proj-elisp.el'.

In a Lisp file, updated a version string for THIS to VERSION. There are standards in Elisp files specifying how the version string is found, such as a `-version' variable, or the standard header.

(ede-update-version-in-source (THIS ede-proj-target-elisp) VERSION) in `ede/proj-elisp.el'.

In a Lisp file, updated a version string for THIS to VERSION. There are standards in Elisp files specifying how the version string is found, such as a `-version' variable, or the standard header.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/proj-elisp.el.gz
(cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version)
  "In a Lisp file, updated a version string for THIS to VERSION.
There are standards in Elisp files specifying how the version string
is found, such as a `-version' variable, or the standard header."
  (if (and (slot-boundp this 'versionsource)
	   (oref this versionsource))
      (let ((vs (oref this versionsource))
	    ) ;; (match nil)
	(while vs
	  (with-current-buffer (find-file-noselect
                                (ede-expand-filename this (car vs)))
	    (goto-char (point-min))
	    (let ((case-fold-search t))
	      (if (re-search-forward "-version\\s-+\"\\([^\"]+\\)\"" nil t)
		  (progn
		    ;; (setq match t)
		    (delete-region (match-beginning 1)
				   (match-end 1))
		    (goto-char (match-beginning 1))
		    (insert version)))))
	  (setq vs (cdr vs)))
	;; The next method will include comments such as "Version:"
	(cl-call-next-method))))