1. xemacs
  2. prog-modes

Source

prog-modes / javascript-mode.el

Diff from to

File javascript-mode.el

  • Ignore whitespace
 ;; a lot afterwards by Ville Skyttä.
 
 ;; Contributors:
-;;   Sreng Truong (bug fix for 21.1)
+;;   Sreng Truong      (bug fix for 21.1)
+;;   Sebastian Delmont (fix for prototype function indentation problems)
 
 ;; TODO:
 ;; - Multiple font-lock/highlight levels.
 
 ;; ------------------------------------------------------------------------ ;;
 
-(defconst javascript-mode-version "1.4" "Version of `javascript-mode'.")
+(defconst javascript-mode-version "1.5" "Version of `javascript-mode'.")
 
 ;; ------------------------------------------------------------------------ ;;
 
     (setq local-abbrev-table javascript-mode-abbrev-table)
     (c-set-offset 'inher-cont '+)
 
+    ; cc-mode does not handle JavaScript prototype function declarations well.
+    ; Thanks to Sebastian Delmont.
+    (set (make-local-variable 'c-lambda-key) "function")
+    (c-set-offset 'inlambda 0)
+
     ; Restore the original c++-mode-hook.
     (setq c++-mode-hook current-c++-mode-hook)