From 2d178ca98751b0d7376ca41607a6f3141d21d7ad Mon Sep 17 00:00:00 2001 From: Trey Merkley Date: Sat, 14 Jul 2018 18:19:58 -0500 Subject: [PATCH 01/16] removed sym-comp dependency to bring up to 26.1 --- renpy.el | 1 - 1 file changed, 1 deletion(-) diff --git a/renpy.el b/renpy.el index e877cf9..5324429 100644 --- a/renpy.el +++ b/renpy.el @@ -47,7 +47,6 @@ (require 'compile) (require 'hippie-exp)) -(require 'sym-comp) (autoload 'comint-mode "comint") (defgroup renpy nil From c3419647d4e7f434f50b4fc9685b518dae3f5b27 Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Thu, 19 Jul 2018 23:09:43 -0500 Subject: [PATCH 02/16] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 027ebf6..f4a8171 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Ren'Py mode PyTom's old major mode for Ren'Py. + +This mode is currently unmaintained. I'm keeping it because the original upstream doesn't use either Emacs or Ren'Py anymore. If you use this and know ELisp better than I do (a very low bar), let me know and this major mode is yours. From 241e3ca64f7807d20e86c7832d58db15481add59 Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Thu, 19 Jul 2018 23:10:03 -0500 Subject: [PATCH 03/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4a8171..8eec97b 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ PyTom's old major mode for Ren'Py. -This mode is currently unmaintained. I'm keeping it because the original upstream doesn't use either Emacs or Ren'Py anymore. If you use this and know ELisp better than I do (a very low bar), let me know and this major mode is yours. +This mode is currently unmaintained. I'm keeping it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know ELisp better than I do (a very low bar), let me know and this major mode is yours. From 0f2849dd1fb8902d42639ce47e1406683d37344e Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Mon, 20 Aug 2018 11:33:31 -0500 Subject: [PATCH 04/16] fixed a typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8eec97b..97f0acd 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ PyTom's old major mode for Ren'Py. -This mode is currently unmaintained. I'm keeping it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know ELisp better than I do (a very low bar), let me know and this major mode is yours. +This mode is currently unmaintained. I'm keeping it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know Elisp better than I do (a very low bar), let me know and this major mode is yours. From 90d9baa1a764f219cbf4b6dbafaab15639a9486e Mon Sep 17 00:00:00 2001 From: Trey Merkley Date: Sat, 1 Sep 2018 07:55:39 -0500 Subject: [PATCH 05/16] linting and package formatting --- renpy.el | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/renpy.el b/renpy.el index 5324429..e815b36 100644 --- a/renpy.el +++ b/renpy.el @@ -1,7 +1,3 @@ -; WARNING: This file is automatically generated. -;WARNING: Edit renpy.el.tmpl instead, then run make_renpy_el.py - -; -*- emacs-lisp -*- ;;; renpy.el --- silly walks for Renpy -*- coding: iso-8859-1 -*- ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 @@ -11,11 +7,18 @@ ;; Based on python.el, which has the following maintainership: -;; Author: Dave Love -;; Maintainer: FSF +;; Maintainer: Dave Love ; Quil ; Billy Wade ;; Created: Nov 2003 +;; Version: 0.3 +;; Homepage: https://github.com/billywade/renpy-mode ;; Keywords: languages +;;; Commentary: + +;; PyTom's old major mode for Ren'Py, the visual studio engine + +;;; License: + ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify @@ -1409,7 +1412,7 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)." ;;;; Utility stuff -(defsubst renpy-in-string/comment () +(defsubst renpy-in-string-comment () "Return non-nil if point is in a Renpy literal (a comment or string)." ;; We don't need to save the match data. (nth 8 (syntax-ppss))) @@ -1420,7 +1423,7 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)." table) "`renpy-mode-syntax-table' with backslash given whitespace syntax.") -(defun renpy-skip-comments/blanks (&optional backward) +(defun renpy-skip-comments-blanks (&optional backward) "Skip comments and blank lines. BACKWARD non-nil means go backwards, otherwise go forwards. Backslash is treated as whitespace so that continued blank lines @@ -1510,7 +1513,7 @@ The criteria are that the line isn't a comment or in string and (back-to-indentation) (and (looking-at (rx (and (or "else" "finally" "except" "elif") symbol-end))) - (not (renpy-in-string/comment)) + (not (renpy-in-string-comment)) ;; Ensure there's a previous statement and move to it. (zerop (renpy-previous-statement)) (not (renpy-close-block-statement-p t)) @@ -1753,7 +1756,7 @@ corresponding block opening (or nil)." ;; Check we don't have something like: ;; if ...: ... (if (progn (renpy-end-of-statement) - (renpy-skip-comments/blanks t) + (renpy-skip-comments-blanks t) (eq ?: (char-before))) (setq indent (+ renpy-indent indent))))) (push (cons indent initial) levels)) @@ -1897,7 +1900,7 @@ reached start of buffer." ;; (and def-line (= in ci)) (= in ci) (< in ci))) - (not (renpy-in-string/comment))) + (not (renpy-in-string-comment))) (setq found t))) found)) @@ -1917,7 +1920,7 @@ Finds end of innermost nested class or method definition." (if (zerop (current-indentation)) (unless (renpy-open-block-statement-p) (while (and (re-search-forward pattern nil 'move) - (renpy-in-string/comment))) ; just loop + (renpy-in-string-comment))) ; just loop (unless (eobp) (beginning-of-line))) ;; Don't move before top-level statement that would end defun. @@ -1928,7 +1931,7 @@ Finds end of innermost nested class or method definition." (if (and (bobp) (not (looking-at "def\\|class"))) (while (and (not (eobp)) (re-search-forward pattern nil 'move) - (renpy-in-string/comment)))) ; just loop + (renpy-in-string-comment)))) ; just loop ;; We're at a definition statement (or end-of-buffer). (unless (eobp) (renpy-end-of-block) @@ -2030,7 +2033,7 @@ Return count of statements left to move." (renpy-next-statement (- count)) (renpy-beginning-of-statement) (while (and (> count 0) (not (bobp))) - (renpy-skip-comments/blanks t) + (renpy-skip-comments-blanks t) (renpy-beginning-of-statement) (unless (bobp) (setq count (1- count)))) count)) @@ -2047,7 +2050,7 @@ Return count of statements left to move." (let (bogus) (while (and (> count 0) (not (eobp)) (not bogus)) (renpy-end-of-statement) - (renpy-skip-comments/blanks) + (renpy-skip-comments-blanks) (if (eq 'string (syntax-ppss-context (syntax-ppss))) (setq bogus t) (unless (eobp) @@ -2070,7 +2073,7 @@ Otherwise return non-nil." (let ((point (point))) (if (or (renpy-comment-line-p) (renpy-blank-line-p)) - (renpy-skip-comments/blanks t)) + (renpy-skip-comments-blanks t)) (renpy-beginning-of-statement) (let ((ci (current-indentation))) (if (zerop ci) @@ -2108,7 +2111,7 @@ don't move and return nil. Otherwise return t." (while (and (> arg 0) (let* ((point (point)) (_ (if (renpy-comment-line-p) - (renpy-skip-comments/blanks t))) + (renpy-skip-comments-blanks t))) (ci (current-indentation)) (open (renpy-open-block-statement-p))) (if (and (zerop ci) (not open)) @@ -2117,7 +2120,7 @@ don't move and return nil. Otherwise return t." (while (zerop (renpy-next-statement)) (when (or (and open (<= (current-indentation) ci)) (< (current-indentation) ci)) - (renpy-skip-comments/blanks t) + (renpy-skip-comments-blanks t) (beginning-of-line 2) (throw 'done t))))))) (setq arg (1- arg))) @@ -2144,7 +2147,7 @@ don't move and return nil. Otherwise return t." ;; renpy-next-statement 2970 1.024717 0.0003450225 ;; renpy-end-of-statement 2970 0.4332190000 0.0001458649 ;; renpy-beginning-of-defun 265 0.0918479999 0.0003465962 -;; renpy-skip-comments/blanks 3125 0.0753319999 2.410...e-05 +;; renpy-skip-comments-blanks 3125 0.0753319999 2.410...e-05 (defvar renpy-recursing) ;;;; `Electric' commands. @@ -2158,7 +2161,7 @@ just insert a single colon." (and (not arg) (eolp) (renpy-outdent-p) - (not (renpy-in-string/comment)) + (not (renpy-in-string-comment)) (> (current-indentation) (renpy-calculate-indentation)) (renpy-indent-line))) ; OK, do it (put 'renpy-electric-colon 'delete-selection t) @@ -2173,7 +2176,7 @@ Repeat ARG times." (if (or (/= (current-indentation) (current-column)) (bolp) (renpy-continuation-line-p) - (renpy-in-string/comment)) + (renpy-in-string-comment)) (backward-delete-char-untabify arg) ;; Look for the largest valid indentation which is smaller than ;; the current indentation. @@ -2537,3 +2540,4 @@ with skeleton expansions for compound statement templates. (provide 'renpy) +;;; renpy.el ends here From 7d77026361a8fd2afac0e030d5b23021af2c1961 Mon Sep 17 00:00:00 2001 From: Trey Merkley Date: Sat, 1 Sep 2018 08:00:45 -0500 Subject: [PATCH 06/16] updating copyright information --- renpy.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/renpy.el b/renpy.el index e815b36..8a7ab85 100644 --- a/renpy.el +++ b/renpy.el @@ -2,6 +2,8 @@ ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 ;; Free Software Foundation, Inc. +;; Copyright (C) 2018 +;; Billy Wade ;; Author: PyTom From cf9c9ead6084210a4c0290a0d999a099b8d00a81 Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Fri, 7 Sep 2018 14:34:07 -0500 Subject: [PATCH 07/16] Fixed maintainer info --- renpy.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renpy.el b/renpy.el index 8a7ab85..8703c9f 100644 --- a/renpy.el +++ b/renpy.el @@ -9,7 +9,7 @@ ;; Based on python.el, which has the following maintainership: -;; Maintainer: Dave Love ; Quil ; Billy Wade +;; Maintainer: Dave Love ; Quildreen Motta ; Billy Wade ;; Created: Nov 2003 ;; Version: 0.3 ;; Homepage: https://github.com/billywade/renpy-mode @@ -69,7 +69,7 @@ (defvar renpy-font-lock-keywords `(,(rx symbol-start - ;; From v 2.5 reference, § keywords. + ;; From v 2.5 reference, � keywords. ;; def and class dealt with separately below (or "and" "as" "assert" "break" "continue" "del" "elif" "else" "except" "exec" "finally" "for" "from" "global" "if" @@ -180,7 +180,7 @@ "zorder" ) symbol-end) - (,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.5 manual + (,(rx symbol-start "None" symbol-end) ; see � Keywords in 2.5 manual . font-lock-constant-face) ;; Definitions (,(rx symbol-start (group "class") (1+ space) (group (1+ (or word ?_)))) From 5f1db591f6105ac59b135e0b9a47f5ecea758c28 Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Fri, 4 Jan 2019 13:14:30 -0600 Subject: [PATCH 08/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97f0acd..d70429f 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ PyTom's old major mode for Ren'Py. -This mode is currently unmaintained. I'm keeping it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know Elisp better than I do (a very low bar), let me know and this major mode is yours. +I'm maintaining it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know Elisp better than I do (a very low bar), let me know and this major mode is yours. From 097959c22f9a9131b3a9d74e9b195ea6f6e4364b Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Fri, 4 Jan 2019 13:15:06 -0600 Subject: [PATCH 09/16] Rename README.md to README.org --- README.md => README.org | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => README.org (100%) diff --git a/README.md b/README.org similarity index 100% rename from README.md rename to README.org From c720333874de7caa4f4d24e257aa82f177a02991 Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Fri, 4 Jan 2019 13:15:26 -0600 Subject: [PATCH 10/16] Update README.org --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index d70429f..5d69d60 100644 --- a/README.org +++ b/README.org @@ -1,4 +1,4 @@ -# Ren'Py mode +#+TITLE: Ren'Py mode PyTom's old major mode for Ren'Py. From 943e1af71d23128ff100d41d178ccffe28f97944 Mon Sep 17 00:00:00 2001 From: Billy Wade Date: Fri, 19 Apr 2019 12:49:56 -0500 Subject: [PATCH 11/16] band-aid to fix `eldoc error: (void-function renpy-eldoc-function)` --- renpy.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renpy.el b/renpy.el index 8703c9f..f469f66 100644 --- a/renpy.el +++ b/renpy.el @@ -2426,9 +2426,9 @@ with skeleton expansions for compound statement templates. (set (make-local-variable 'eldoc-documentation-function) #'renpy-eldoc-function) - (add-hook 'eldoc-mode-hook - (lambda () (run-renpy nil t)) ; need it running - nil t) +;; (add-hook 'eldoc-mode-hook +;; (lambda () (run-renpy nil t)) ; need it running +;; nil t) (set (make-local-variable 'symbol-completion-symbol-function) 'renpy-partial-symbol) (set (make-local-variable 'symbol-completion-completions-function) From fadfc572d99460a7cda9bea7fb0734c0c1fa1507 Mon Sep 17 00:00:00 2001 From: Trey Merkley Date: Wed, 3 Jun 2020 17:16:43 -0600 Subject: [PATCH 12/16] Referred to new maintainer --- README.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 5d69d60..6e84e07 100644 --- a/README.org +++ b/README.org @@ -2,4 +2,6 @@ PyTom's old major mode for Ren'Py. -I'm maintaining it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know Elisp better than I do (a very low bar), let me know and this major mode is yours. +~~I'm maintaining it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know Elisp better than I do (a very low bar), let me know and this major mode is yours.~~ + +This mode now has a real maintainer! Head to https://github.com/Reagankm/renpy-mode for all future updates. Have fun and enjoy all that Ren'Py has to offer! \ No newline at end of file From bb85d1f1751ba54fd2785a4ddf4b2acbadfa2647 Mon Sep 17 00:00:00 2001 From: Trey Merkley Date: Wed, 3 Jun 2020 17:20:32 -0600 Subject: [PATCH 13/16] Remove old section --- README.org | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.org b/README.org index 6e84e07..f65a8cb 100644 --- a/README.org +++ b/README.org @@ -2,6 +2,4 @@ PyTom's old major mode for Ren'Py. -~~I'm maintaining it because the original upstream developer doesn't use either Emacs or Ren'Py anymore. If you use this and know Elisp better than I do (a very low bar), let me know and this major mode is yours.~~ - This mode now has a real maintainer! Head to https://github.com/Reagankm/renpy-mode for all future updates. Have fun and enjoy all that Ren'Py has to offer! \ No newline at end of file From ed9456e5ae8524eef8b80e6d0642db3b427beabb Mon Sep 17 00:00:00 2001 From: Reagan Middlebrook Date: Sat, 6 Jun 2020 11:19:35 -0700 Subject: [PATCH 14/16] Update readme with instructions and history --- README.org | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index f65a8cb..53fba07 100644 --- a/README.org +++ b/README.org @@ -1,5 +1,17 @@ #+TITLE: Ren'Py mode -PyTom's old major mode for Ren'Py. +PyTom's old major mode for Ren'Py, previously maintained by treymerkley, now maintained by me. -This mode now has a real maintainer! Head to https://github.com/Reagankm/renpy-mode for all future updates. Have fun and enjoy all that Ren'Py has to offer! \ No newline at end of file +** Installation + + Either install within Emacs directly from MELPA or: + * Download/clone this repo to your desired location. + * In Emacs, use the command =M-x package-install-file= and point it to the renpy.el file location + * This will install it to your =~/.emacs.d/elpa/= directory (or your custom location if you've manually set a different =package-user-dir= in Emacs) + * In your .emacs file, add =(require 'renpy)= + +** History + +Originally this was PyTom's major mode for Ren'Py but he no longer uses Emacs or Ren'Py anymore. Then maintenance was taken over by Trey Merkley @treymerkley but he was looking for someone else to take it on who was more familiar with Elisp. So now it is maintained by me. + +Come at me, parentheses. I dare you. From 5b9d7322744470f66829db3102363eb7094b7ff7 Mon Sep 17 00:00:00 2001 From: Reagan Middlebrook Date: Sat, 6 Jun 2020 18:10:52 -0700 Subject: [PATCH 15/16] Per package-lint preference, don't put closing parens on own line --- renpy.el | 53 ++++++++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/renpy.el b/renpy.el index f469f66..ebdaeff 100644 --- a/renpy.el +++ b/renpy.el @@ -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) @@ -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) @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) @@ -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)))))) From f2f95a72a8c842f229f80999132e8ea8ee73f6fc Mon Sep 17 00:00:00 2001 From: Reagan Middlebrook Date: Sat, 6 Jun 2020 18:35:12 -0700 Subject: [PATCH 16/16] Revert "Per package-lint preference, don't put closing parens on own line" This reverts commit 5b9d7322744470f66829db3102363eb7094b7ff7. --- renpy.el | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/renpy.el b/renpy.el index ebdaeff..f469f66 100644 --- a/renpy.el +++ b/renpy.el @@ -38,12 +38,13 @@ ;;; 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) @@ -176,7 +177,8 @@ "with" "with" "yield" -"zorder") +"zorder" + ) symbol-end) (,(rx symbol-start "None" symbol-end) ; see � Keywords in 2.5 manual . font-lock-constant-face) @@ -1258,7 +1260,8 @@ "ypadding" "ypos" "yzoom" -"zoom")) symbol-end) +"zoom" + )) symbol-end) (1 font-lock-builtin-face)) (,(rx symbol-start (or ;; other built-ins @@ -1381,7 +1384,8 @@ 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 @@ -2419,7 +2423,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 @@ -2454,7 +2458,8 @@ 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 @@ -2482,15 +2487,19 @@ 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) @@ -2501,25 +2510,33 @@ 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))) + ) + ) + )