;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-(defun iankmod-start ()
- (interactive)
- (shell-command "/a/h/get-comments" "*messages*")
- (find-file "/tmp/hcomments")
- (iankmod 1))
+
+;; generally, use m-x iankmod-start. c-u to run on local testing
+;; instance. Alternatively, run get-comments with whatever args,
+;; manually open /tmp/hcomments, then run (iankmod).
+
+(defun iankmod-start (arg)
+ (interactive "P")
+ (setq iankmod-last-arg (if (equal arg '(4)) " -l" ""))
+ (let ((cmd (concat "/a/h/get-comments" iankmod-last-arg)))
+ (shell-command cmd "*messages*")
+ (find-file "/tmp/hcomments")
+ (iankmod 1)))
+
(defun iankmod-save ()
(interactive)
- (shell-command "/a/h/set-comments" "*messages*"))
+ (basic-save-buffer)
+ (let ((cmd (concat "/a/h/set-comments" iankmod-last-arg)))
+ (shell-command cmd "*messages*")))
(defun iankmod-set-state (state)