Menu

#19 add constants and keyword

open
nobody
None
4
2010-10-25
2009-09-15
No

The patch adds
- the php constants : STDIN STDOUT STERR
- the oci constans:: OCI_FETCHSTATEMENT_BY_ROW OCI_FETCHSTATEMENT_BY_COLUMN
- class declaration of clone

The following patch is based on the latest svn version as of Sep 15, 2009.

590a592
> "STDIN" "STDOUT" "STDERR"
822,823c825,828
< ; "OCI_EXACT_FETCH" "SQLT_BFILEE" "SQLT_CFILEE" "SQLT_CLOB"
< ; "SQLT_BLOB" "SQLT_RDD" "OCI_B_SQLT_NTY" "OCI_SYSDATE"
---
> ; "OCI_EXACT_FETCH" "OCI_SYSDATE"
> ; "OCI_FETCHSTATEMENT_BY_ROW" "OCI_FETCHSTATEMENT_BY_COLUMN"
> ; "SQLT_BFILEE" "SQLT_CFILEE" "SQLT_CLOB" "SQLT_BLOB" "SQLT_RDD"
> ; "OCI_B_SQLT_NTY"
1019c1024
< '("\\&lt;\\(new\\|extends\\|implements\\)\\s-+\\$?\\(\\sw+\\)"
---
> '("\\&lt;\\(new\\|clone\\|extends\\|implements\\)\\s-+\\$?\\(\\sw+\\)"

Discussion

  • Dias Bantekas

    Dias Bantekas - 2009-09-15
    • priority: 5 --> 2
     
  • Dias Bantekas

    Dias Bantekas - 2010-10-25

    here is an updated patch, which in addition to the above also adds:
    - php constants CASE_LOWER, CASE_UPPER
    - high-light for :
    + 'default' in case statements
    + 'clone' keyword

    Patch here:
    *** php-mode.el 2010-03-15 09:44:46.000000000 +0200
    --- php-mode-new.el 2010-10-25 12:45:33.000000000 +0300
    ***************
    *** 588,593 ****
    --- 589,595 ----
    "PHP_BINDIR" "PHP_LIBDIR" "PHP_DATADIR" "PHP_SYSCONFDIR"
    "PHP_LOCALSTATEDIR" "PHP_CONFIG_FILE_PATH"
    "PHP_EOL"
    + "STDIN" "STDOUT" "STDERR"

    ;; date and time constants
    "DATE_ATOM" "DATE_COOKIE" "DATE_ISO8601"
    ***************
    *** 596,601 ****
    --- 598,604 ----
    "DATE_RSS" "DATE_W3C"

    ;; from ext/standard:
    + "CASE_LOWER" "CASE_UPPER"
    "EXTR_OVERWRITE" "EXTR_SKIP" "EXTR_PREFIX_SAME"
    "EXTR_PREFIX_ALL" "EXTR_PREFIX_INVALID" "SORT_ASC" "SORT_DESC"
    "SORT_REGULAR" "SORT_NUMERIC" "SORT_STRING" "ASSERT_ACTIVE"
    ***************
    *** 626,631 ****
    --- 629,635 ----
    "LOG_LOCAL6" "LOG_LOCAL7" "LOG_PID" "LOG_CONS" "LOG_ODELAY"
    "LOG_NDELAY" "LOG_NOWAIT" "LOG_PERROR"

    +
    ;; Disabled by default because they slow buffer loading
    ;; If you have use for them, uncomment the strings
    ;; that you want colored.
    ***************
    *** 821,826 ****
    --- 825,831 ----
    ; "OCI_DEFAULT" "OCI_DESCRIBE_ONLY" "OCI_COMMIT_ON_SUCCESS"
    ; "OCI_EXACT_FETCH" "SQLT_BFILEE" "SQLT_CFILEE" "SQLT_CLOB"
    ; "SQLT_BLOB" "SQLT_RDD" "OCI_B_SQLT_NTY" "OCI_SYSDATE"
    + ; "OCI_FETCHSTATEMENT_BY_ROW" "OCI_FETCHSTATEMENT_BY_COLUMN"
    ; "OCI_B_BFILE" "OCI_B_CFILEE" "OCI_B_CLOB" "OCI_B_BLOB"
    ; "OCI_B_ROWID" "OCI_B_CURSOR" "OCI_B_BIN" "OCI_ASSOC" "OCI_NUM"
    ; "OCI_BOTH" "OCI_RETURN_NULLS" "OCI_RETURN_LOBS"
    ***************
    *** 983,989 ****
    '(1 font-lock-keyword-face))

    ;; Fontify keywords and targets, and case default tags.
    ! (list "\\&lt;\\(break\\|case\\|continue\\)\\&gt;\\s-+\\(-?\\sw+\\)?"
    '(1 font-lock-keyword-face) '(2 font-lock-constant-face t t))
    ;; This must come after the one for keywords and targets.
    '(":" ("^\\s-+\\(\\sw+\\)\\s-+\\s-+$"
    --- 988,994 ----
    '(1 font-lock-keyword-face))

    ;; Fontify keywords and targets, and case default tags.
    ! (list "\\&lt;\\(break\\|case\\|default\\|continue\\)\\&gt;\\s-+\\(-?\\sw+\\)?"
    '(1 font-lock-keyword-face) '(2 font-lock-constant-face t t))
    ;; This must come after the one for keywords and targets.
    '(":" ("^\\s-+\\(\\sw+\\)\\s-+\\s-+$"
    ***************
    *** 1016,1022 ****
    ;; thereby excluding it from unknown-symbol checks later
    ;; FIX to handle implementing multiple
    ;; currently breaks on "class Foo implements Bar, Baz"
    ! '("\\&lt;\\(new\\|extends\\|implements\\)\\s-+\\$?\\(\\sw+\\)"
    (1 font-lock-keyword-face) (2 font-lock-type-face))

    ;; function declaration
    --- 1021,1027 ----
    ;; thereby excluding it from unknown-symbol checks later
    ;; FIX to handle implementing multiple
    ;; currently breaks on "class Foo implements Bar, Baz"
    ! '("\\&lt;\\(new\\|clone\\|extends\\|implements\\)\\s-+\\$?\\(\\sw+\\)"
    (1 font-lock-keyword-face) (2 font-lock-type-face))

    ;; function declaration

     
  • Dias Bantekas

    Dias Bantekas - 2010-10-25

    php-mode.patch updated

     
  • Dias Bantekas

    Dias Bantekas - 2010-10-25
    • priority: 2 --> 4
     

Log in to post a comment.