From bad665bd22d43762b43d40251b6d8ffdffceae64 Mon Sep 17 00:00:00 2001 From: stephen Date: Thu, 29 Dec 2005 16:13:40 +0000 Subject: [PATCH] (ess-s-versions-create): If ess-s-versions is nil, do not search for other versions of S using this method (ess-s-versions-list will still be examined). git-svn-id: https://svn.r-project.org/ESS/trunk@3438 0bbaf3bd-34e0-0310-bf65-c717079852d4 --- lisp/essd-sp6.el | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/lisp/essd-sp6.el b/lisp/essd-sp6.el index c975ed04..00910e77 100644 --- a/lisp/essd-sp6.el +++ b/lisp/essd-sp6.el @@ -141,6 +141,8 @@ version of S. If duplicate versions of the same program are found (which happens if the same path is listed on `exec-path' more than once), they are ignored by calling `ess-uniq-list'. +Set this variable to nil to disable searching for other versions +of S using this method. If you set this variable, you need to restart Emacs (and set this variable before ess-site is loaded) for it to take effect. @@ -184,30 +186,30 @@ This function was generated by `ess-s-versions-create'.\" ;; clear the buffer. (delete-region (point-min) (point-max)) - ;; Find which versions of S we want. Remove the pathname, leaving just - ;; the name of the executable. - (setq versions - (ess-uniq-list - (mapcar 'file-name-nondirectory - (apply 'nconc - (mapcar 'ess-find-exec-completions - ess-s-versions))))) - (ess-write-to-dribble-buffer - (format "(S): ess-s-versions-create making M-x defuns for %s" - (mapconcat 'identity versions " "))) - (setq ess-s-versions-created versions) ;keep copy for returning at end. - ;; Iterate over each string in VERSIONS, creating a new defun each time. - (while versions - (setq version (car versions) - versions (cdr versions)) - (setq beg (point)) - (insert template) - (goto-char beg) - (while (search-forward "S-X.Y" nil t) - (replace-match version t t)) - (goto-char (point-max)) - ) - + (when ess-s-versions + ;; Find which versions of S we want. Remove the pathname, leaving just + ;; the name of the executable. + (setq versions + (ess-uniq-list + (mapcar 'file-name-nondirectory + (apply 'nconc + (mapcar 'ess-find-exec-completions + ess-s-versions))))) + (ess-write-to-dribble-buffer + (format "(S): ess-s-versions-create making M-x defuns for %s" + (mapconcat 'identity versions " "))) + (setq ess-s-versions-created versions) ;keep copy for returning at end. + ;; Iterate over each string in VERSIONS, creating a new defun each time. + (while versions + (setq version (car versions) + versions (cdr versions)) + (setq beg (point)) + (insert template) + (goto-char beg) + (while (search-forward "S-X.Y" nil t) + (replace-match version t t)) + (goto-char (point-max)) + )) ;; Check if we have any static defuns to evaluate. (when ess-s-versions-list -- 2.11.4.GIT