all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to check if cperl-mode.el file is loaded
@ 2010-05-20 21:15 Powell, Eric
  0 siblings, 0 replies; 5+ messages in thread
From: Powell, Eric @ 2010-05-20 21:15 UTC (permalink / raw
  To: 'help-gnu-emacs@gnu.org'

[-- Attachment #1: Type: text/plain, Size: 2208 bytes --]

Hello,

I am trying to use the newest version of cperl-mode and, although I am not getting errors, I still don't think it's loaded correctly.  I downloaded the cperl-mode.el file from http://github.com/jrockway/cperl-mode and placed it in my elisp directory.

What gets me is that when I check the version (C-h v cperl-version) it says 4.23, which is the same version number that my emacs originally came with.

Is there anything in particular that I should notice different between v4.23 and the current version at the website above?

On a side note, in my .emacs file, I notice that if I put the require statement after the 'add-to-list' command that I get an error: 'error: "Invalid escape character syntax"'.  That doesn't seem right to me, but when I switched the order of the two it went away, so I left it like that.

Here is my .emacs file:

####################################################################################
;; .emacs
(require 'cperl-mode)
(add-to-list 'load-path "~/elisp")

;; ---- CPERL MODE ----- ;;
;;; cperl-mode is preferred to perl-mode
;;; "Brevity is the soul of wit" <foo at acm.org>
(defalias 'perl-mode 'cperl-mode)

;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)

;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
  (global-font-lock-mode t))

;; enable visual feedback on selections
;(setq transient-mark-mode t)

;; default to better frame titles
(setq frame-title-format
      (concat  "%b - emacs@" (system-name)))

;; default to unified diffs
(setq diff-switches "-u")

;; always end a file with a newline
;(setq require-final-newline 'query)

(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(comment-column 80)
 '(truncate-partial-width-windows t))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )

####################################################################################

Thank you for your help :)
-eric

[-- Attachment #2: Type: text/html, Size: 8905 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* How to check if cperl-mode.el file is loaded
@ 2010-05-20 21:26 eric_powell
  2010-05-21  1:48 ` Kevin Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: eric_powell @ 2010-05-20 21:26 UTC (permalink / raw
  To: Help-gnu-emacs


Hello, 

I am trying to use the newest version of cperl-mode and, although I am not
getting errors, I still don’t think it’s loaded correctly.  I downloaded the
cperl-mode.el file from http://github.com/jrockway/cperl-mode and placed it
in my elisp directory.  

What gets me is that when I check the version (C-h v cperl-version) it says
4.23, which is the same version number that my emacs originally came with.  

Is there anything in particular that I should notice different between v4.23
and the current version at the website above?

On a side note, in my .emacs file, I notice that if I put the require
statement after the ‘add-to-list’ command that I get an error: ‘error:
"Invalid escape character syntax"’.  That doesn’t seem right to me, but when
I switched the order of the two it went away, so I left it like that.

Here is my .emacs file: 

####################################################################################
;; .emacs
(require 'cperl-mode)
(add-to-list 'load-path "~/elisp")

;; ---- CPERL MODE ----- ;;
;;; cperl-mode is preferred to perl-mode
;;; "Brevity is the soul of wit" <foo at acm.org>
(defalias 'perl-mode 'cperl-mode)

;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)

;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
  (global-font-lock-mode t))

;; enable visual feedback on selections
;(setq transient-mark-mode t)

;; default to better frame titles
(setq frame-title-format
      (concat  "%b - emacs@" (system-name)))

;; default to unified diffs
(setq diff-switches "-u")

;; always end a file with a newline
;(setq require-final-newline 'query)

(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(comment-column 80)
 '(truncate-partial-width-windows t))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )

####################################################################################

Thank you for your help :)
-eric

-- 
View this message in context: http://old.nabble.com/How-to-check-if-cperl-mode.el-file-is-loaded-tp28626296p28626296.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to check if cperl-mode.el file is loaded
       [not found] <mailman.12.1274390157.10164.help-gnu-emacs@gnu.org>
@ 2010-05-20 23:20 ` Tim X
  0 siblings, 0 replies; 5+ messages in thread
From: Tim X @ 2010-05-20 23:20 UTC (permalink / raw
  To: help-gnu-emacs

"Powell, Eric" <EPowell1@med.miami.edu> writes:

> Hello,
>
> I am trying to use the newest version of cperl-mode and, although I am not
> getting errors, I still don’t think it’s loaded correctly.  I downloaded the
> cperl-mode.el file from http://github.com/jrockway/cperl-mode and placed it in
> my elisp directory. 
>
> What gets me is that when I check the version (C-h v cperl-version) it says
> 4.23, which is the same version number that my emacs originally came with. 
>
> Is there anything in particular that I should notice different between v4.23
> and the current version at the website above?
>
> On a side note, in my .emacs file, I notice that if I put the require
> statement after the ‘add-to-list’ command that I get an error: ‘error:
> "Invalid escape character syntax"’.  That doesn’t seem right to me, but when I
> switched the order of the two it went away, so I left it like that.
>

If you have the require before the add-to-path statement, then you will
be loading the cperl mode that comes with meacs, not the one you hve
downloaded. 

The invalid syntax error indicates (at a guess) either that

1. The file you have odnwloaded is currupted. Try byte compiling it and
see if you get any errors.

2. The cperl mode you are tyring to use is not compatible with the
version of emacs you are running. I'm guessing, but perhaps the version
you are tyring to load has been modified to support a later version of
emacs and is not compatible with the version you are running. 

Note that there is considerable confusion surrounding cperl mode and
version numbes. The main problem is that the author of cperl mode
maintains his own version with version numbers that are independent from
the version and version numbers of the one bundled with emacs. It seems
that there is some stuff in cperl mode that the emacs maintainers need
to modify (I don't know the full details) to include it in the emacs
distribution. 

One way to avoid confusion is to rename the cperl source files that come
with emacs to something like oldcperl.el and oldcperl.elc. Then get the
version you have downloaded installed and working. 

Tim

-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to check if cperl-mode.el file is loaded
  2010-05-20 21:26 eric_powell
@ 2010-05-21  1:48 ` Kevin Rodgers
  2010-05-24 18:13   ` eric_powell
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2010-05-21  1:48 UTC (permalink / raw
  To: help-gnu-emacs

eric_powell wrote:

> On a side note, in my .emacs file, I notice that if I put the require
> statement after the ‘add-to-list’ command that I get an error: ‘error:
> "Invalid escape character syntax"’.  That doesn’t seem right to me, but when
> I switched the order of the two it went away, so I left it like that.
> 
> Here is my .emacs file: 
> 
> ####################################################################################
> ;; .emacs
> (require 'cperl-mode)
> (add-to-list 'load-path "~/elisp")
...

M-x list-load-path-shadows

-- 
Kevin Rodgers
Denver, Colorado, USA




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to check if cperl-mode.el file is loaded
  2010-05-21  1:48 ` Kevin Rodgers
@ 2010-05-24 18:13   ` eric_powell
  0 siblings, 0 replies; 5+ messages in thread
From: eric_powell @ 2010-05-24 18:13 UTC (permalink / raw
  To: Help-gnu-emacs



Kevin Rodgers-2 wrote:
> 
> eric_powell wrote:
> 
>> On a side note, in my .emacs file, I notice that if I put the require
>> statement after the ‘add-to-list’ command that I get an error: ‘error:
>> "Invalid escape character syntax"’.  That doesn’t seem right to me, but
>> when
>> I switched the order of the two it went away, so I left it like that.
>> 
>> Here is my .emacs file: 
>> 
>> ####################################################################################
>> ;; .emacs
>> (require 'cperl-mode)
>> (add-to-list 'load-path "~/elisp")
> ...
> 
> M-x list-load-path-shadows
> 
> -- 
> Kevin Rodgers
> Denver, Colorado, USA
> 
> 
> 
> 

Fantastic!  Thanks, Kevin.  I ran that command and I got this (below), so I
guess it is loaded even though that isn't reflected in the M-x cperl-version
command.

#################################################
~/elisp/cperl-mode hides /usr/share/emacs/21.4/lisp/progmodes/cperl-mode

1 Emacs Lisp load-path shadowing was found
#################################################

-- 
View this message in context: http://old.nabble.com/How-to-check-if-cperl-mode.el-file-is-loaded-tp28626296p28659892.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-24 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-20 21:15 How to check if cperl-mode.el file is loaded Powell, Eric
  -- strict thread matches above, loose matches on Subject: below --
2010-05-20 21:26 eric_powell
2010-05-21  1:48 ` Kevin Rodgers
2010-05-24 18:13   ` eric_powell
     [not found] <mailman.12.1274390157.10164.help-gnu-emacs@gnu.org>
2010-05-20 23:20 ` Tim X

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.