Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Favorite Hacks in Emacs

by shem (Initiate)
on May 13, 2009 at 11:37 UTC ( [id://763739]=note: print w/replies, xml ) Need Help??


in reply to Favorite Hacks in Emacs

(defun cw_save_check () "Run the Perl syntax checker on this buffer after saving." (cond ((equal mode-name "CPerl") (progn (save-current-buffer (set-buffer (get-buffer-create "*Perl cw output*")) (erase-buffer)) (call-process-region (point-min) (point-max) "/usr/bin/perl" nil + "*Perl cw output*" n il "-c -I.") (save-current-buffer (set-buffer "*Perl cw output*") (cond ((equal (buffer-string) "- syntax OK\n") (message "%s" "Synta +x OK")) (t (message "%s" "The program has errors.")))))) (t nil))) (add-hook 'after-save-hook 'cw_save_check)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://763739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-23 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found