unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1621: Please move cperl micro-docs to top of the cperl-mode.el file
@ 2009-02-20 18:39 era eriksson
  2009-02-21  0:15 ` Ilya Zakharevich
  0 siblings, 1 reply; 18+ messages in thread
From: era eriksson @ 2009-02-20 18:39 UTC (permalink / raw)
  To: 1621; +Cc: Ilya Zakharevich

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

How about a slight refactoring to make it more obvious where to look for
the startup information?

Please find attached a proposed patch.  This is just a quick proof of
concept; perhaps there is more startup-related information which could
be moved to the new variable.

(Cc:ing Ilya as I don't know whether he subscribes to this bug report.)

/* era */

-- 
If this were a real .signature, it would suck less.  Well, maybe not.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cperl-mode-el.patch --]
[-- Type: text/x-patch; name="cperl-mode-el.patch", Size: 2467 bytes --]

--- emacs-snapshot-20090207/lisp/progmodes/cperl-mode.el~	2009-02-20 09:44:54.000000000 +0200
+++ emacs-snapshot-20090207/lisp/progmodes/cperl-mode.el	2009-02-20 09:43:09.000000000 +0200
@@ -28,6 +28,9 @@
 
 ;;; Commentary:
 
+;; To use this mode instead of perl-mode for Perl files, see the
+;; documentation for the variable `cperl-setup'
+
 ;; You can either fine-tune the bells and whistles of this mode or
 ;; bulk enable them by putting
 
@@ -37,8 +40,8 @@
 ;; correct to make whistles enabled by default.)
 
 ;; DO NOT FORGET to read micro-docs (available from `Perl' menu)   <<<<<<
-;; or as help on variables `cperl-tips', `cperl-problems',         <<<<<<
-;; `cperl-praise', `cperl-speed'.				   <<<<<<
+;; or as help on variables `cperl-setup', `cperl-tips',		   <<<<<<
+;; `cperl-problems',`cperl-praise', `cperl-speed'.		   <<<<<<
 
 ;; The mode information (on C-h m) provides some customization help.
 ;; If you use font-lock feature of this mode, it is advisable to use
@@ -700,6 +703,12 @@
 
 ;;; Short extra-docs.
 
+(defvar cperl-setup 'please-ignore-this-line
+  "If your Emacs does not default to `cperl-mode' on Perl files, and you
+want it to: put the following into your .emacs file:
+
+  (defalias 'perl-mode 'cperl-mode)"
+
 (defvar cperl-tips 'please-ignore-this-line
   "Get maybe newer version of this package from
   http://ilyaz.org/software/emacs
@@ -721,11 +730,6 @@
 Note that to enable Compile choices in the menu you need to install
 mode-compile.el.
 
-If your Emacs does not default to `cperl-mode' on Perl files, and you
-want it to: put the following into your .emacs file:
-
-  (defalias 'perl-mode 'cperl-mode)
-
 Get perl5-info from
   $CPAN/doc/manual/info/perl5-old/perl5-info.tar.gz
 Also, one can generate a newer documentation running `pod2texi' converter
@@ -1369,6 +1373,7 @@
 	  ["Memorize Current" (cperl-set-style "Current") t]
 	  ["Memorized" (cperl-set-style-back) cperl-old-style])
 	 ("Micro-docs"
+	  ["Setup" (describe-variable 'cperl-setup) t]
 	  ["Tips" (describe-variable 'cperl-tips) t]
 	  ["Problems" (describe-variable 'cperl-problems) t]
 	  ["Speed" (describe-variable 'cperl-speed) t]
@@ -1688,7 +1693,7 @@
 with no args.
 
 DO NOT FORGET to read micro-docs (available from `Perl' menu)
-or as help on variables `cperl-tips', `cperl-problems',
+or as help on variables `cperl-setup', `cperl-tips', `cperl-problems',
 `cperl-praise', `cperl-speed'."
   (interactive)
   (kill-all-local-variables)

^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <20070401035915.3121.73126.malonedeb@gangotri.ubuntu.com>]

end of thread, other threads:[~2020-10-15 15:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 18:39 bug#1621: Please move cperl micro-docs to top of the cperl-mode.el file era eriksson
2009-02-21  0:15 ` Ilya Zakharevich
2009-02-21 10:54   ` era eriksson
2009-02-21 22:53     ` Ilya Zakharevich
2009-03-16  2:10       ` era eriksson
2009-03-16  4:03         ` Ilya Zakharevich
2009-03-16  8:48           ` era eriksson
2009-03-16  9:12             ` Ilya Zakharevich
2009-03-16 20:00               ` era eriksson
2009-03-16 23:50                 ` Ilya Zakharevich
     [not found] <20070401035915.3121.73126.malonedeb@gangotri.ubuntu.com>
2008-12-18  5:14 ` Jason A. Spiro
2008-12-18 21:39   ` Stefan Monnier
2008-12-19  2:28     ` Glenn Morris
2008-12-19  6:06     ` Jason A. Spiro
2008-12-20 22:53       ` Ilya Zakharevich
2008-12-20 23:41         ` Jason A. Spiro
     [not found]           ` <20081221000241.GA17638@powdermilk.math.berkeley.edu>
2008-12-21  0:13             ` Jason A. Spiro
2020-10-15 15:11   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).