Skip to content

Commit 040c8eb

Browse files
authored
Merge pull request #59 from lassik/patches
Patches
2 parents c51cdb2 + bd27341 commit 040c8eb

File tree

4 files changed

+32
-28
lines changed

4 files changed

+32
-28
lines changed

dime-repl.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ This is automatically synchronized from Dylan.")
411411
(setq font-lock-defaults nil)
412412
(setq mode-name "REPL")
413413
(setq dime-current-thread :repl-thread)
414-
(setq dime-write-string-function 'dime-repl-write-string)
415414
(set (make-local-variable 'scroll-conservatively) 20)
416415
(set (make-local-variable 'scroll-margin) 0)
417416
(when dime-repl-history-file
@@ -1486,6 +1485,7 @@ expansion will be added to the REPL's history.)"
14861485
(remove-hook 'dime-connected-hook 'dime-repl-connected-hook-function))
14871486

14881487
(setq dime-output-target-to-marker-function 'dime-repl-target-to-marker)
1488+
(setq dime-write-string-function 'dime-repl-write-string)
14891489
(add-hook 'dime-repl-mode-hook 'dime-repl-add-easy-menu)
14901490
(add-hook 'dime-sync-project-and-directory-hook
14911491
'dime-repl-sync-project-and-directory)

dime.el

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,25 @@
1818

1919
;;; Commentary:
2020

21-
;; This file contains extensions for programming in Open Dylan.
22-
;; The main features are:
21+
;; Dime is the Dylan interaction mode for Emacs. It is essentially an
22+
;; IDE (integrated development environment) for the Dylan programming
23+
;; language and the Open Dylan toolchain.
2324

24-
;; * A socket-based communication/RPC interface between Emacs and
25-
;; Dylan, enabling introspection and remote development.
25+
;; The main features are:
2626

27-
;; * The `dime-mode' minor-mode complementing `dylan-mode'. This new
28-
;; mode includes many commands for interacting with the Open Dylan
29-
;; process.
27+
;; * The `dime-mode' minor-mode. It augments `dylan-mode' with many
28+
;; commands for interacting with Open Dylan.
3029

31-
;; * A Dylan debugger written in Emacs Lisp. The debugger pops up
32-
;; an Emacs buffer similar to the Emacs/Elisp debugger.
30+
;; * The ability to display compiler messages directly at their source
31+
;; code locations.
3332

34-
;; * A Open Dylan inspector to interactively look at run-time data.
33+
;; * A debugger running in Emacs, similar to the Emacs Lisp debugger.
3534

36-
;; * Trapping compiler messages and creating annotations in the source
37-
;; file on the appropriate forms.
35+
;; * An inspector to interactively look at run-time data.
3836

39-
;; In order to run Dime, a supporting Dylan server called Swank is
40-
;; required.
37+
;; Dime works by opening a socket between Emacs and Open Dylan and
38+
;; communicating via the dswank protocol. Dime traces its history back
39+
;; to SLIME (the Superior Lisp Interaction Mode for Emacs).
4140

4241
;;; Code:
4342

@@ -5407,7 +5406,7 @@ This is 0 if START and END at the same line."
54075406
(- (count-lines start end)
54085407
(if (save-excursion (goto-char end) (bolp)) 0 1)))
54095408

5410-
(defvar-local dime-write-string-function nil)
5409+
(defvar dime-write-string-function nil)
54115410

54125411
(defun dime-write-string (string &optional target)
54135412
"Insert STRING in the REPL buffer or some other TARGET.

dylan-opt.el

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,21 +243,22 @@ can be used to toggle the optimization highlighting on and off."
243243

244244
(defun dylan-opt--default-file-name ()
245245
"Guess a default optimization file to match the current buffer."
246-
(let* ((path (buffer-file-name))
247-
(name (file-name-nondirectory path))
248-
(stem (substring name 0 (string-match "\\.[^.]*$" name)))
249-
(library dylan-buffer-library))
250-
(expand-file-name
251-
(concat (or (getenv "OPEN_DYLAN_USER_ROOT") "_build")
252-
"/build/" library "/" stem ".el"))))
246+
(and (buffer-file-name)
247+
(let* ((path (buffer-file-name))
248+
(name (file-name-nondirectory path))
249+
(stem (substring name 0 (string-match "\\.[^.]*$" name)))
250+
(library dylan-buffer-library))
251+
(expand-file-name
252+
(concat (or (getenv "OPEN_DYLAN_USER_ROOT") "_build")
253+
"/build/" library "/" stem ".el")))))
253254

254255
;;;###autoload
255256
(defun dylan-opt (opt-file)
256257
"Show Dylan optimization faces according to OPT-FILE.
257258
258259
See the command `dylan-opt-mode', which this command enables."
259260
(interactive
260-
(list (let ((default (dylan-opt--default-file-name)))
261+
(list (let ((default (or (dylan-opt--default-file-name) "")))
261262
(read-file-name
262263
"Dylan optimization file: "
263264
(file-name-directory default) nil t

dylan.el

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@
2121

2222
;;; Commentary:
2323

24-
;; Dylan mode is a major mode for editing Dylan programs. It provides
25-
;; indenting and syntax highlighting support.
24+
;; This package provides three Emacs modes for the Dylan programming
25+
;; language:
26+
27+
;; * The `dylan-mode` major mode to edit Dylan code.
28+
;; * The `dylan-opt-mode` minor mode to show compiler optimizations.
29+
;; * The `dylan-lid-mode` major mode to edit LID files.
30+
31+
;;; Code:
2632

2733
;; Testing
2834
;;
@@ -41,8 +47,6 @@
4147
;; their values, frequently the easiest way to test changes is to start a new
4248
;; Emacs.
4349

44-
;;; Code:
45-
4650
;;; Customization:
4751

4852
(defgroup dylan nil

0 commit comments

Comments
 (0)