branch: externals/beardbolt commit be3f92821e8c4d16c7aab06d1c6037ab5da5da43 Author: Jay Kamat <jaygka...@gmail.com> Commit: Jay Kamat <jaygka...@gmail.com>
Clean up PHP exporter slightly --- rmsbolt.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rmsbolt.el b/rmsbolt.el index 36acab6ba0..882d48fac0 100644 --- a/rmsbolt.el +++ b/rmsbolt.el @@ -912,26 +912,24 @@ Argument SRC-BUFFER source buffer." (nreverse result))) (cl-defun rmsbolt--process-php-bytecode (_src-buffer asm-lines) - (let ((source-linum nil) - (state 'useless) + (let ((state 'useless) (current-line nil) (result nil)) (dolist (line asm-lines) - (case state + (cl-case state ((text) (push line result) (when (string-match "^-+$" line) (setq state 'asm))) ((asm) (cond - ((equalp "" line) (setq state 'useless) (push "" result)) + ((string-empty-p line) (setq state 'useless)) ((string-match "^ *\\([0-9]+\\) +[0-9]+" line) (setq current-line (string-to-number (match-string 1 line))) - (add-text-properties 0 (length line) `(rmsbolt-src-line ,current-line) line) - (push line result)) + (add-text-properties 0 (length line) `(rmsbolt-src-line ,current-line) line)) (t - (add-text-properties 0 (length line) `(rmsbolt-src-line ,current-line) line) - (push line result)))) + (add-text-properties 0 (length line) `(rmsbolt-src-line ,current-line) line))) + (push line result)) (otherwise (when (string-match "^filename:" line) (setq state 'text)))))