Skip to content

Commit

Permalink
Per package-lint preference, don't put closing parens on own line
Browse files Browse the repository at this point in the history
  • Loading branch information
Reagankm committed Jun 7, 2020
1 parent ed9456e commit 5b9d732
Showing 1 changed file with 18 additions and 35 deletions.
53 changes: 18 additions & 35 deletions renpy.el
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@

;;; Code:

(setq renpy-generic-imenu
(setq renpy-generic-imenu
'( ( nil "\\b\\(label\\|menu\\)\\s-+\\(\\w+\\):" 2)
( nil "\\b\\(screen\\)\\s-+\\(\\w+\\):" 2)
( nil "\\b\\(transform\\)\\s-+\\(\\w+\\):" 2)
; ( nil "\\bcall\\s-+\\w+\\s-+from\\s-+\\(\\w+\\)" 1)
( nil "\\b\\(def\\|class\\)\\s-+\\(\\w+\\)" 2)
))
( nil "\\b\\(def\\|class\\)\\s-+\\(\\w+\\)" 2)))

(require 'comint)

Expand Down Expand Up @@ -177,8 +176,7 @@
"with"
"with"
"yield"
"zorder"
)
"zorder")
symbol-end)
(,(rx symbol-start "None" symbol-end) ; see � Keywords in 2.5 manual
. font-lock-constant-face)
Expand Down Expand Up @@ -1260,8 +1258,7 @@
"ypadding"
"ypos"
"yzoom"
"zoom"
)) symbol-end)
"zoom")) symbol-end)
(1 font-lock-builtin-face))
(,(rx symbol-start (or
;; other built-ins
Expand Down Expand Up @@ -1384,8 +1381,7 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)."
["Start of block" renpy-beginning-of-block
:help "Go to start of innermost definition around point"]
["End of block" renpy-end-of-block
:help "Go to end of innermost definition around point"]
))
:help "Go to end of innermost definition around point"]))
map))

;; Fixme: add toolbar stuff for useful things like symbol help, send
Expand Down Expand Up @@ -2423,7 +2419,7 @@ with skeleton expansions for compound statement templates.

(setq imenu-create-index-function 'imenu-default-create-index-function)
(setq imenu-generic-expression renpy-generic-imenu)

(set (make-local-variable 'eldoc-documentation-function)
#'renpy-eldoc-function)
;; (add-hook 'eldoc-mode-hook
Expand Down Expand Up @@ -2458,8 +2454,7 @@ with skeleton expansions for compound statement templates.
(when renpy-guess-indent (renpy-guess-indent))
;; Let's make it harder for the user to shoot himself in the foot.
(unless (= tab-width renpy-indent)
(setq indent-tabs-mode nil))
)
(setq indent-tabs-mode nil)))

;; Not done automatically in Emacs 21 or 22.
(defcustom renpy-mode-hook nil
Expand Down Expand Up @@ -2487,19 +2482,15 @@ with skeleton expansions for compound statement templates.
(fill-prefix (renpy-string-fill-prefix))
(fill-column (- fill-column string-indentation))
(fill-paragraph-function nil)
(indent-line-function nil)
)

(indent-line-function nil))

(message "fill prefix: %S" fill-prefix)

(renpy-fill-string (renpy-string-start))
t
)
(renpy-fill-paragraph-2 justify)
)
)
t)
(renpy-fill-paragraph-2 justify)))

; Indents the current line.
; Indents the current line.
(defun renpy-indent-line (&optional arg)
(interactive)

Expand All @@ -2510,33 +2501,25 @@ with skeleton expansions for compound statement templates.
(save-excursion
(beginning-of-line)
(if (eq (renpy-in-literal) 'string)
(progn
(progn
(delete-horizontal-space)
(indent-to (renpy-string-indentation))
)
))
(indent-to (renpy-string-indentation)))))

(if ( < (current-column) (current-indentation) )
(back-to-indentation) )

)
(back-to-indentation) ))


; Computes the start of the current string.
(defun renpy-string-start ()
(nth 8 (parse-partial-sexp (point-min) (point)))
)
(nth 8 (parse-partial-sexp (point-min) (point))))

; Computes the amount of indentation needed to put the current string
; in the right spot.
(defun renpy-string-indentation ()
(defun renpy-string-indentation ()
(+ 1
(save-excursion
(- (goto-char (renpy-string-start))
(progn (beginning-of-line) (point)))
)
)
)
(progn (beginning-of-line) (point))))))



Expand Down

0 comments on commit 5b9d732

Please sign in to comment.