develooper Front page | perl.perl5.porters | Postings from August 2003

[patch] more fullpath TAGS patches (emacs/cperl-mode.el + emacs/ptags)

Thread Next
From:
Stas Bekman
Date:
August 28, 2003 16:11
Subject:
[patch] more fullpath TAGS patches (emacs/cperl-mode.el + emacs/ptags)
Message ID:
3F4E8BF8.1090800@stason.org
I thought I have finished fixing ptags to optionally generate TAGS with full 
paths, but I've missed the stuff generated by cperl-mode.el, so I had to patch 
it as well. This probably requires a blessing from Ilya, as he is the 
maintainer for emacs/cperl-mode.el

Ilya, please notice that I have also fixed the description of the older 
function, which wasn't so correct (must be a copy-n-paste).

Attached and inlined.

--- emacs/cperl-mode.el.orig	2003-08-28 14:06:05.000000000 -0700
+++ emacs/cperl-mode.el	2003-08-28 16:05:00.000000000 -0700
@@ -1134,6 +1134,10 @@
  ;;;				Now works for else/continue/sub blocks
  ;;;  (`cperl-short-docs'):	Minor edits; make messages fit 80-column screen

+;;;; After 4.37:
+;;;  `cperl-add-tags-recurse-noxs-fullpath'
+;;;    added (for -batch mode);
+
  ;;; Code:

  
@@ -6868,13 +6872,21 @@
  	ret))))

  (defun cperl-add-tags-recurse-noxs ()
-  "Add to TAGS data for Perl and XSUB files in the current directory and kids.
-Use as
+  "Add to TAGS data for Perl (skipping XSUBs) in the current directory
+and kids. Use as
    emacs -batch -q -no-site-file -l emacs/cperl-mode.el \
-        -f cperl-add-tags-recurse
+        -f cperl-add-tags-recurse-noxs
  "
    (cperl-write-tags nil nil t t nil t))

+(defun cperl-add-tags-recurse-noxs-fullpath ()
+  "Add to TAGS data for Perl (skipping XSUBs) in the current directory
+and kids, using fullpath, so TAGS is relocatable. Use as
+  emacs -batch -q -no-site-file -l emacs/cperl-mode.el \
+        -f cperl-add-tags-recurse-noxs-fullpath
+"
+  (cperl-write-tags nil nil t t nil t ""))
+
  (defun cperl-add-tags-recurse ()
    "Add to TAGS file data for Perl files in the current directory and kids.
  Use as
--- emacs/ptags.orig	2003-08-28 13:50:21.000000000 -0700
+++ emacs/ptags	2003-08-28 14:20:22.000000000 -0700
@@ -27,10 +27,12 @@
  case "$1" in
    fullpath)
      cwd=`pwd`
+    cperl_add_tags='cperl-add-tags-recurse-noxs-fullpath'
      echo "Building TAGS with full paths"
    ;;
    *)
-  cwd='.'
+    cperl_add_tags='cperl-add-tags-recurse-noxs'
+    cwd='.'
      echo "Building TAGS with relative paths"
  esac

@@ -167,7 +169,7 @@
  # This should work with newer Emaxen

  cp TAGS.tmp TAGS
-if $emacs -batch -q -no-site-file -l emacs/cperl-mode.elc -f 
cperl-add-tags-recurse-noxs ; then
+if $emacs -batch -q -no-site-file -l emacs/cperl-mode.elc -f $cperl_add_tags 
; then
      mv TAGS TAGS.tmp
  fi

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About