Skip to content

Commit

Permalink
Address comments from melpa review (#9)
Browse files Browse the repository at this point in the history
See melpa/melpa#8348 (comment)

Co-authored-by: Rudolf Schlatte <[email protected]>
  • Loading branch information
rudi and Rudolf Schlatte committed Jan 9, 2023
1 parent 63d047a commit 291f1bb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modelica-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ This keymap tries to adhere to Emacs keybindings conventions.")
modelica-new-mode-map
modelica-original-mode-map))
(use-local-map modelica-mode-map)
(setq-local indent-line-function 'modelica-indent-line)
(setq-local indent-line-function #'modelica-indent-line)
;; comment syntax
(setq-local comment-column 32
comment-start "// "
Expand Down Expand Up @@ -431,7 +431,7 @@ Insert an empty documentation string if necessary."
;; insert new docstring
(forward-char 1)
(indent-to (max comment-column (1+ (current-column))))
(insert (concat "\"\"" deleted))
(insert "\"\"" deleted)
(forward-char (- (1+ (length deleted))))))
(modelica-indent-line))

Expand Down Expand Up @@ -886,7 +886,7 @@ Return block ident (string) or nil if not found.
(delete-region (point) save-point))
;; insert proper end
(indent-to indentation)
(insert (concat "end " end-ident ";"))
(insert "end " end-ident ";")
;; step back if block just starts
(if (not block-start)
()
Expand Down Expand Up @@ -928,7 +928,7 @@ Ignore byte-compiler warnings you might see."
(modelica-within-string)
(modelica-within-matrix-expression))))
(forward-comment (point-max))
(if (= (point) (point-max))
(if (eobp)
(progn
(goto-char save-point)
(error "No next statement"))
Expand All @@ -938,7 +938,7 @@ Ignore byte-compiler warnings you might see."
(while (> (point) save-point)
(setq pos (point))
(forward-comment (- (point-max)))
(if (> (point) (point-min))
(if (not (bobp))
(forward-char -1))
(modelica-statement-start))
(goto-char pos))))))
Expand All @@ -955,7 +955,7 @@ Ignore byte-compiler warnings you might see."
;; else move backward
(setq save-point (point))
(forward-comment (- (point-max)))
(if (> (point) (point-min))
(if (not (bobp))
(forward-char -1))
(modelica-statement-start)
(if (= (point) save-point)
Expand Down Expand Up @@ -1156,8 +1156,8 @@ property to the overlay that makes the outline invisible."

;; test for overlay
(defun modelica-within-overlay (prop)
"Return overlay value if point is contained in an overlay with
property PROP, nil otherwise."
"Overlay value when point is in an overlay with property PROP.
If point is not in such an overlay, return nil."
(let ((overlays (overlays-at (point)))
(value nil)
o)
Expand Down

0 comments on commit 291f1bb

Please sign in to comment.