all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Vineet Naik <naikvin@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Getting an error when working with php files in nXhtml mode
Date: Mon, 18 Jul 2011 08:44:32 +0200	[thread overview]
Message-ID: <4E23D650.8030404@easy-emacs.de> (raw)
In-Reply-To: <CADmbCiP-bqYYqm-2Kj8OSYczMSJnAC0RDZHOqJ1HFzttZhpPsA@mail.gmail.com>

Am 18.07.2011 08:20, schrieb Vineet Naik:
> Hi Andreas,
>
> Thank you for replying. Following is my .emacs file. I don't quite know
> emacs lisp so it mostly contains stuff copy pasted from forums and blogs

Hi Vineet,

unfortunatly can't see a related line in your post.

BTW would recommend copying stuff only when being able to read it - 
otherwise trouble is probable.

As not in active use here, can't track the error, sorry.

Please write to the Author/Maintainer, who is known being attentive.
nXhtml has it's own bug-report function BTW which you may use likewise.

Good luck,

Andreas



>
> ;; for php, xhtml, js mixed docs etc.
> (load "~/emacs/nxhtml/autostart.el")
>
> ;; Sets the basic indentation for C/php source files
> ;; to four spaces.
> (setq c-basic-offset 4)
>
> ;; I hate tabs!
> (setq-default indent-tabs-mode nil)
>
> ;; I hate line-wrapping!
> (setq-default truncate-lines t)
>
> ;; show line numbers on left
> (global-linum-mode t)
>
> ;; This .emacs file illustrates the minimul setup
> ;; required to run the JDE.
>
> ;; Set the debug option to enable a backtrace when a
> ;; problem occurs.
> (setq debug-on-error t)
>
> ;; Update the Emacs load-path to include the path to
> ;; the JDE and its require packages. This code assumes
> ;; that you have installed the packages in the emacs/site
> ;; subdirectory of your home directory.
> (add-to-list 'load-path (expand-file-name "~/emacs/site/jde/lisp"))
> (add-to-list 'load-path (expand-file-name "~/emacs/site/cedet-1.0/common"))
> (add-to-list 'load-path (expand-file-name
> "~/usr/share/emacs/site-lisp/elib"))
>
> ;; Initialize CEDET.
> (load-file (expand-file-name "~/emacs/site/cedet-1.0/common/cedet.el"))
>
>
> ;; If you want Emacs to defer loading the JDE until you open a
> ;; Java file, edit the following line
> (setq defer-loading-jde nil)
> ;; to read:
> ;;
> ;;  (setq defer-loading-jde t)
> ;;
>
> (if defer-loading-jde
>      (progn
>        (autoload 'jde-mode "jde" "JDE mode." t)
>        (setq auto-mode-alist
>      (append
>       '(("\\.java\\'" . jde-mode))
>       auto-mode-alist)))
>    (require 'jde))
>
>
> ;; Sets the basic indentation for Java source files
> ;; to four spaces.
> (defun my-jde-mode-hook ()
>    (setq c-basic-offset 4))
>
> (add-hook 'jde-mode-hook 'my-jde-mode-hook)
> (custom-set-variables
>    ;; custom-set-variables was added by Custom.
>    ;; If you edit it by hand, you could mess it up, so be careful.
>    ;; Your init file should contain only one such instance.
>    ;; If there is more than one, they won't work right.
>   '(espresso-indent-level 2)
>   '(jde-compiler (quote (("eclipse java compiler server"
> "/home/vineet/eclipse/plugins/org.eclipse.jdt.core_3.5.2.v_981_R35x.jar"))))
>   '(jde-jdk (quote ("1.6.0_20")))
>   '(jde-jdk-registry (quote (("1.6.0_20" . "/usr/lib/jvm/java-6-openjdk"))))
>   '(jde-run-working-directory "/home/vineet/java/trial/src/")
>   '(nxml-bind-meta-tab-to-complete-flag t)
>   '(nxml-child-indent 4)
>   '(nxml-outline-child-indent 2))
> (custom-set-faces
>    ;; custom-set-faces was added by Custom.
>    ;; If you edit it by hand, you could mess it up, so be careful.
>    ;; Your init file should contain only one such instance.
>    ;; If there is more than one, they won't work right.
>   '(default ((t (:inherit nil :stipple nil :background "white" :foreground
> "black" :inverse-video nil :box nil :strike-through nil :overline nil
> :underline nil :slant normal :weight normal :height 113 :width normal
> :foundry "bitstream" :family "Courier 10 Pitch"))))
>   '(mumamo-background-chunk-major ((((class color) (min-colors 88)
> (background light)) nil)))
>   '(mumamo-background-chunk-submode1 ((((class color) (min-colors 88)
> (background light)) nil))))
>
> (add-to-list 'load-path (expand-file-name "~/emacs/site/common"))
>
> ;; espresso (javascript mode)
> (autoload #'espresso-mode "espresso" "Start espresso-mode" t)
> (add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
> (add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;; php-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; php, tpl etc
> (add-to-list 'auto-mode-alist '("\\.tpl\\'" . php-mode))
>
> ;; for better array indentation in php
> (add-hook 'php-mode-hook (lambda ()
>      (defun ywb-php-lineup-arglist-intro (langelem)
>        (save-excursion
>          (goto-char (cdr langelem))
>          (vector (+ (current-column) c-basic-offset))))
>      (defun ywb-php-lineup-arglist-close (langelem)
>        (save-excursion
>          (goto-char (cdr langelem))
>          (vector (current-column))))
>      (c-set-offset 'arglist-intro 'ywb-php-lineup-arglist-intro)
>      (c-set-offset 'arglist-close 'ywb-php-lineup-arglist-close)))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;; flymake ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (require 'flymake)
>
> ;; flymake for php
> (defun flymake-php-init ()
>    "Use php to check the syntax of the current file."
>    (let* ((temp (flymake-init-create-temp-buffer-copy
> 'flymake-create-temp-inplace))
>   (local (file-relative-name temp (file-name-directory buffer-file-name))))
>      (list "php" (list "-f" local "-l"))))
>
> (add-to-list 'flymake-err-line-patterns
>    '("\\(Parse\\|Fatal\\) error: +\\(.*?\\) in \\(.*?\\) on line
> \\([0-9]+\\)$" 3 4 nil 2))
>
> (add-to-list 'flymake-allowed-file-name-masks '("\\.php$" flymake-php-init))
>
> ;; flymake for java
> (require 'jde-eclipse-compiler-server)
>
> (add-to-list 'flymake-allowed-file-name-masks '("\\.java$"
> jde-ecj-server-flymake-init jde-ecj-flymake-cleanup))
>
> (add-hook 'find-file-hook 'flymake-mode)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;; themes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; color themes<http://www.nongnu.org/color-theme/>
> (require 'color-theme)
>
> ;; solarized theme
> (add-to-list 'load-path (expand-file-name
> "~/emacs/site/common/solarized-theme"))
> (require 'color-theme-solarized)
> (color-theme-solarized-dark)
>
> ;; zenburn theme
> ;;(require 'color-theme-zenburn)
> ;;(color-theme-zenburn)
>
>
> ;;;;;;;;;;;;;;;;;;;;;;;;; YasSnippet
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (require 'yasnippet-bundle)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;; Markdown mode
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (autoload 'markdown-mode "markdown-mode.el"
>     "Major mode for editing Markdown files" t)
> (setq auto-mode-alist
>     (cons '("\\.md" . markdown-mode) auto-mode-alist))
>
>
>
> On Sun, Jul 17, 2011 at 1:58 PM, Andreas Röhler<
> andreas.roehler@easy-emacs.de>  wrote:
>
>> Am 08.07.2011 08:42, schrieb Vineet Naik:
>>
>>   Hi,
>>>
>>> I am getting an error while working in .php files that also contain some
>>> html.
>>>
>>> I always get an error whenever typing the opening or closing brackets ( ()
>>> )
>>> inside php code
>>>
>>> for eg. if I type
>>>
>>> <td><?php echo $person->getName(); ?></td>
>>>
>>> it shows me following error after typing ( and ) in getName()
>>>
>>> Debugger entered--Lisp error: (wrong-type-argument listp set-from-style)
>>>    c-electric-paren(nil)
>>>    call-interactively(c-electric-**paren nil nil)
>>>
>>> Please help!
>>>
>>> Thanks.
>>>
>>
>> Hi,
>>
>> not using these modes actively:
>>
>> seems c-electric-paren installs a global key.
>> Maybe have a look into your init.
>>
>> HTH,
>>
>> Andreas
>>
>>
>
>




      reply	other threads:[~2011-07-18  6:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08  6:42 Getting an error when working with php files in nXhtml mode Vineet Naik
2011-07-17  8:28 ` Andreas Röhler
2011-07-18  6:20   ` Vineet Naik
2011-07-18  6:44     ` Andreas Röhler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E23D650.8030404@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=naikvin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.