Skip to content

Commit

Permalink
Fix calls to do-applescript
Browse files Browse the repository at this point in the history
do-applescript isn't a function in any recent Emacs. We can get the
same functionality from ns-do-applescript. We still have
to (declare-function ...) though because ns-do-applescript won't be
defined on GNU/Linux systems.
  • Loading branch information
jabranham committed Apr 15, 2018
1 parent fdd4479 commit cd0a24d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lisp/ess-r-a.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@
;; you can invoke ESS/R from emacs by typing
;; C-u M-x essr
;; with vsize set to (for example) 40M, and nsize set to 600000.

;; Undefined on non-apple devices
(declare-function ns-do-applescript "nsfns.m" (script))
(declare-function do-applescript "ess-r-a" (script))
(unless (fboundp 'do-applescript)
(defalias 'do-applescript 'ns-do-applescript))

(defalias 'essr
(read-kbd-macro
"C-u M-x R RET - - vsize = 40M SPC - - nsize = 600000 2*RET"))
Expand Down
3 changes: 3 additions & 0 deletions lisp/ess-sas-a.el
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

;;; Section 1: Variable Definitions

;; For do-applescript
(require 'ess-r-a)

(defvar ess-sas-file-path "."
"Full path-name of the sas file to perform operations on.")

Expand Down

0 comments on commit cd0a24d

Please sign in to comment.