From fb44854be19e62557a1453bf072cf99b14f7f1af Mon Sep 17 00:00:00 2001 From: capitaomorte Date: Mon, 26 Jul 2010 17:13:38 +0000 Subject: [PATCH] * more ideas for objc method hippie completion --- extras/imported/objc-mode/.yas-setup.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/extras/imported/objc-mode/.yas-setup.el b/extras/imported/objc-mode/.yas-setup.el index 01b26e9..a072e99 100644 --- a/extras/imported/objc-mode/.yas-setup.el +++ b/extras/imported/objc-mode/.yas-setup.el @@ -66,8 +66,8 @@ ppss) (save-excursion (condition-case nil - (while (not (eq (point) (point-min))) (backward-sexp)) - (error nil)) + (while (not (eq (point) (point-max))) (backward-sexp)) + (error )) (when (eq (preceding-char) ?\[) (setq orig-ppss (syntax-ppss)) (forward-sexp) @@ -75,11 +75,14 @@ (setq ppss (syntax-ppss)) (condition-case nil (while (and (>= (car ppss) (car orig-ppss)) - (search-forward-regexp "[[:alpha:]]+:" nil 'noerror)) + (search-forward-regexp "[[:alpha:]]+:" orig-point 'noerror)) (setq ppss (syntax-ppss)) (when (eq (car ppss) (car orig-ppss)) (setq sig (concat (or sig "") (match-string-no-properties 0)))) (forward-sexp)) - (error sig)) + (error nil)) + (save-excursion + (backward-word) + (concat sig (buffer-substring-no-properties (point) orig-point))) sig))))