Loading ...
Sorry, an error occurred while loading the content.
 

perldoc-mode

Expand Messages
  • dgroth@gmx.de
    hello, in order to simplify the use of perldoc I provide a simple mode for handling it. the output of multiple perldocs is collected in a *pod* buffer. Detlef
    Message 1 of 1 , Aug 9, 2001
      hello,

      in order to simplify the use of perldoc I provide
      a simple mode for handling it. the output of multiple
      perldocs is collected in a *pod* buffer.

      Detlef

      ; user.emf
      add-file-hook "*pod*" fhook-pod
      define-macro-file perldoc

      ; perldoc.emf
      define-macro perldoc
      ; if perldoc is in the path
      ; graps its output and collects it in the
      ; buffer *pod*
      set-variable :perldoc-command @ml "perldoc"
      ipipe-shell-command &cat "perldoc " :perldoc-command
      perldoc-execute
      !emacro

      define-macro perldoc-on-package
      ; shows info on a marked package
      ipipe-shell-command &cat "perldoc " @y
      perldoc-execute
      !emacro

      define-macro perldoc-on-function
      ; shows info on a marked function
      ipipe-shell-command &cat "perldoc -f " @y
      perldoc-execute
      !emacro


      0 define-macro perldoc-execute
      !if &sequal $buffer-fhook "fhook-perl"
      next-window-find-buffer "*icommand*"
      !else
      find-buffer "*icommand*"
      !endif
      ; waiting for perldoc finishing
      1000 ml-write "waiting for perldoc ...."
      1000 ml-write "waiting for perldoc ....."
      1000 ml-write "waiting for perldoc ......"
      1000 ml-write "waiting for perldoc ......."
      beginning-of-buffer
      search-forward "perldoc"
      forward-line
      set-mark
      end-of-buffer
      exchange-point-and-mark
      copy-region
      find-buffer "*pod*"
      -38 buffer-mode "view"
      end-of-buffer
      insert-newline
      set-alpha-mark "p"
      yank
      -1 yank
      goto-alpha-mark "p"
      38 buffer-mode "view"
      !emacro
      ; end perldoc.emf

      ; hkpod.emf
      ; provides some simple hilighting

      ; Detlef Groth : Thursday, 9 August 2001

      !if &seq .hilight.mode "ERROR"
      set-variable .hilight.pod &pinc .hilight.next 1
      !endif
      ;
      ; Define the hilighting
      ;
      0 hilight .hilight.pod 1 $global-scheme
      hilight .hilight.pod 2 "#" .scheme.comment
      hilight .hilight.pod 4 "\"" "\"" "\\" .scheme.string

      hilight .hilight.pod 1 "^NAME" .scheme.header
      hilight .hilight.pod 1 "^SYNOPSIS" .scheme.header
      hilight .hilight.pod 1 "^ABSTRACT" .scheme.header
      hilight .hilight.pod 1 "^DESCRIPTION" .scheme.header
      hilight .hilight.pod 1 "^SEE ALSO" .scheme.header
      hilight .hilight.pod 1 "^BUGS" .scheme.header
      hilight .hilight.pod 1 "[a-zA-Z]+::[a-zA-Z]+" .scheme.link



      define-macro fhook-pod
      set-variable $buffer-hilight .hilight.pod
      1 buffer-mode "view"
      !emacro

      ; end hkpod.emf

      --
      Dr.Detlef Groth
      Neue Scheune 5
      14548 Ferch
      Germany

      Aufgepasst - jetzt viele 1&1 New WebHosting Pakete ohne
      Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung!
      http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a
    Your message has been successfully submitted and would be delivered to recipients shortly.