emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 08/39: Minor code tweaks.


From: Phillip Lord
Subject: [elpa] 08/39: Minor code tweaks.
Date: Mon, 20 Oct 2014 08:22:32 +0000

phillord pushed a commit to branch externals/pabbrev
in repository elpa.

commit 99fff4feeb28ae0e1c0c54aafe466b5ac18a1c75
Author: Phillip Lord <address@hidden>
Date:   Thu Oct 25 11:59:52 2012 +0100

    Minor code tweaks.
---
 omn-mode.el |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/omn-mode.el b/omn-mode.el
index 7ed9a3e..0bcba12 100644
--- a/omn-mode.el
+++ b/omn-mode.el
@@ -56,13 +56,17 @@ See `imenu-generic-expression' for details")
     (save-match-data
       ;; check the first word
       
-      (let ((match (re-search-forward "\\w+" (line-end-position) t)))
+      (let* ((match (re-search-forward "\\w+" (line-end-position) t))
+             (word (if match 
+                       (match-string 0)
+                     "")))
+                     
         (cond
-         ((not match)
-          (progn 
-            (if (not (forward-line -1))
-                (omn-determine-line-indent)
-              0)))
+         ;; ((not match)
+         ;;  (progn 
+         ;;    (if (not (forward-line -1))
+         ;;        (omn-determine-line-indent)
+         ;;      0)))
                 
          ;; if it is string, ident should be 0.
          ((nth 3 (syntax-ppss (point)))
@@ -81,10 +85,10 @@ See `imenu-generic-expression' for details")
            (t 0)))
          
          ;; if it is one of Class:, Prefix: or so on, then indent should be 0
-         ((member (match-string 0) omn-mode-entity-keywords)
+         ((member word omn-mode-entity-keywords)
           0)
          ;; if it is Annotations:, SubClassOf: or so on, then indent should be 
4
-         ((member (match-string 0) omn-mode-property-keywords)
+         ((member word omn-mode-property-keywords)
           4)
 
          ;; if it is something else, then 8



reply via email to

[Prev in Thread] Current Thread [Next in Thread]