[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
- [elpa] branch externals/pabbrev created (now e0ac26a), Phillip Lord, 2014/10/20
- [elpa] 04/39: Updated commentary, Phillip Lord, 2014/10/20
- [elpa] 07/39: Added support $$ pass through, which works with an unconfigured asciidoc., Phillip Lord, 2014/10/20
- [elpa] 03/39: Removed SVN keywords, Phillip Lord, 2014/10/20
- [elpa] 10/39: Removed local hook as it's is long obsolete., Phillip Lord, 2014/10/20
- [elpa] 08/39: Minor code tweaks.,
Phillip Lord <=
- [elpa] 09/39: Added slime mode to excluded modes, Phillip Lord, 2014/10/20
- [elpa] 06/39: Prepared for Marmalade, Phillip Lord, 2014/10/20
- [elpa] 11/39: Initial Checkin, Phillip Lord, 2014/10/20
- [elpa] 12/39: Initial Checkin, Phillip Lord, 2014/10/20
- [elpa] 16/39: Clojure mode support added., Phillip Lord, 2014/10/20
- [elpa] 15/39: Documentation Updates., Phillip Lord, 2014/10/20
- [elpa] 13/39: Initial Checkin, Phillip Lord, 2014/10/20
- [elpa] 17/39: Version number added. Documentation fix. Indentation fix., Phillip Lord, 2014/10/20
- [elpa] 05/39: Ported from generic.el to define-derived-mode. Comment-character is now "#" rather than fudged "# " Delimited URIs now recognised as strings Electric indentation added. Indentation engine improved., Phillip Lord, 2014/10/20
- [elpa] 20/39: New keywords added., Phillip Lord, 2014/10/20