From 0cd309588c53d58f9b6ce3ebcfed1e72710f73b3 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 20 Mar 2019 13:01:59 +0100 Subject: Update .emacs.d/lisp/lua-mode.el and .emacs.d/lisp/php-mode.el --- .emacs.d/lisp/lua-mode.el | 9 +++++++++ .emacs.d/lisp/php-mode.el | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to '.emacs.d/lisp') diff --git a/.emacs.d/lisp/lua-mode.el b/.emacs.d/lisp/lua-mode.el index 91fd0a4..af94a13 100644 --- a/.emacs.d/lisp/lua-mode.el +++ b/.emacs.d/lisp/lua-mode.el @@ -1022,6 +1022,15 @@ TOKEN-TYPE determines where the token occurs on a statement. open indicates that (lua-find-regexp 'backward lua-block-regexp)) (defun lua-find-matching-token-word (token &optional direction) + "Find matching open- or close-token for TOKEN in DIRECTION. +Point has to be exactly at the beginning of TOKEN, e.g. with | being point + + {{ }|} -- (lua-find-matching-token-word \"}\" 'backward) will return + -- the first { + {{ |}} -- (lua-find-matching-token-word \"}\" 'backward) will find + -- the second {. + +DIRECTION has to be either 'forward or 'backward." (let* ((token-info (lua-get-block-token-info token)) (match-type (lua-get-token-type token-info)) ;; If we are on a middle token, go backwards. If it is a middle or open, diff --git a/.emacs.d/lisp/php-mode.el b/.emacs.d/lisp/php-mode.el index 364937f..8e72fe3 100644 --- a/.emacs.d/lisp/php-mode.el +++ b/.emacs.d/lisp/php-mode.el @@ -16,7 +16,7 @@ (defconst php-mode-version-number "1.21.0" "PHP Mode version number.") -(defconst php-mode-modified "2019-01-09" +(defconst php-mode-modified "2019-02-28" "PHP Mode build date.") ;; This file is free software; you can redistribute it and/or @@ -675,6 +675,10 @@ might be to handle switch and goto labels differently." (c-lang-const c-constant-kwds)) :test 'string-equal)))) +(c-lang-defconst c-basic-matchers-before + php (cl-remove-if (lambda (elm) (and (listp elm) (equal (car elm) "\\s|"))) + (c-lang-const c-basic-matchers-before php))) + (defun php-lineup-cascaded-calls (langelem) "Line up chained methods using `c-lineup-cascaded-calls', but only if the setting is enabled" -- cgit v1.3