Commits

Peter Szilagyi committed 92fa7b8

Updated obsolete/js stub scripts to handle more cases.

Comments (0)

Files changed (2)

obsolete/js/js-common.el

 (if (yes-or-no-p "Update ~/.emacs? ")
     (progn (find-file (expand-file-name "~/.emacs"))
            (goto-char (point-min))      ; point may be saved
+           ;; Do the path and library name separately, in case people
+           ;; have split their load into an (add-to-list 'load-path
+           ;; ...) and (require ...).  That happens, for example, when
+           ;; people replace jane-defaults with a copy in their
+           ;; ~/.emacs, in order to comment some features out.
+           ;;
+           ;; While we're at it, handle both "test" and "prod" and
+           ;; both jane-defaults and jane-common.
            (query-replace-regexp
-            "/mnt/global/\\(base\\|dev\\)/lib/elisp/js/js-common"
-            "/j/office/app/emacs/prod/jane-elisp/elisp/jane/jane-common")))
+            "/mnt/global/\\(base\\|dev\\)/lib/elisp/js"
+            "/j/office/app/emacs/prod/jane-elisp/elisp/jane")
+           (goto-char (point-min))
+           (query-replace-regexp
+            "/mnt/global/\\(base\\|dev\\)/lib/elisp/jane-test"
+            "/j/office/app/emacs/dev/jane-elisp/elisp/jane")
+           (goto-char (point-min))
+           (query-replace-regexp "js-defaults" "jane-defaults")
+           (goto-char (point-min))
+           (query-replace-regexp "js-common" "jane-common")
+           ))

obsolete/js/js-defaults.el

 (if (yes-or-no-p "Update ~/.emacs? ")
     (progn (find-file (expand-file-name "~/.emacs"))
            (goto-char (point-min))      ; point may be saved
+           ;; Do the path and library name separately, in case people
+           ;; have split their load into an (add-to-list 'load-path
+           ;; ...) and (require ...).  That happens, for example, when
+           ;; people replace jane-defaults with a copy in their
+           ;; ~/.emacs, in order to comment some features out.
+           ;;
+           ;; While we're at it, handle both "test" and "prod" and
+           ;; both jane-defaults and jane-common.
            (query-replace-regexp
-            "/mnt/global/\\(base\\|dev\\)/lib/elisp/js/js-defaults"
-            "/j/office/app/emacs/prod/jane-elisp/elisp/jane/jane-defaults")))
+            "/mnt/global/\\(base\\|dev\\)/lib/elisp/js"
+            "/j/office/app/emacs/prod/jane-elisp/elisp/jane")
+           (goto-char (point-min))
+           (query-replace-regexp
+            "/mnt/global/\\(base\\|dev\\)/lib/elisp/jane-test"
+            "/j/office/app/emacs/dev/jane-elisp/elisp/jane")
+           (goto-char (point-min))
+           (query-replace-regexp "js-defaults" "jane-defaults")
+           (goto-char (point-min))
+           (query-replace-regexp "js-common" "jane-common")
+           ))