*** empty log message ***
This commit is contained in:
parent
ead534947f
commit
abb2db1cf3
7 changed files with 1904 additions and 239 deletions
16
etc/NEWS
16
etc/NEWS
|
@ -1083,6 +1083,22 @@ the buffer, just like for the local files.
|
|||
|
||||
** New modes and packages
|
||||
|
||||
*** THe new package hi-lock.el, text matching interactively entered
|
||||
regexp's can be highlighted. For example,
|
||||
|
||||
M-x highlight-regexp RET clearly RET RET
|
||||
|
||||
will highlight all occurrences of `clearly' using a yellow background
|
||||
face. New occurrences of `clearly' will be highlighted as they are
|
||||
typed. `M-x unhighlight-regexp RET' will remove the highlighting.
|
||||
Any existing face can be used for highlighting and a set of
|
||||
appropriate faces is provided. The regexps can be written into the
|
||||
current buffer in a form that will be recognized the next time the
|
||||
corresponding file is read.
|
||||
|
||||
*** The new package zone.el plays games with Emacs' display when
|
||||
Emacs is idle.
|
||||
|
||||
*** The new package xml.el provides a simple but generic XML
|
||||
parser. It doesn't parse the DTDs however.
|
||||
|
||||
|
|
BIN
lisp-elc.tgz
Normal file
BIN
lisp-elc.tgz
Normal file
Binary file not shown.
|
@ -1,5 +1,9 @@
|
|||
2000-08-02 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
* hi-lock.el: New file.
|
||||
|
||||
* play/zone.el: New file.
|
||||
|
||||
* replace.el (occur): Set tab-width in the *Occur* buffer to the
|
||||
value of tab-width in the original buffer. Choose a line number
|
||||
format that's a multiple of the original buffer's tab width, so
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
(put 'SQL 'custom-loads '("sql"))
|
||||
(put 'refbib 'custom-loads '("refbib"))
|
||||
(put 'elp 'custom-loads '("elp"))
|
||||
(put 'eshell-ext 'custom-loads '("esh-ext"))
|
||||
(put 'ffap 'custom-loads '("ffap"))
|
||||
(put 'shell 'custom-loads '("dirtrack" "shell" "terminal"))
|
||||
(put 'locate 'custom-loads '("locate"))
|
||||
|
@ -15,11 +16,14 @@
|
|||
(put 'shell-directories 'custom-loads '("shell"))
|
||||
(put 'idlwave-documentation 'custom-loads '("idlwave"))
|
||||
(put 'footnote 'custom-loads '("footnote"))
|
||||
(put 'pcomplete 'custom-loads '("pcmpl-cvs" "pcmpl-gnu" "pcmpl-linux" "pcmpl-rpm" "pcomplete" "em-cmpl"))
|
||||
(put 'calendar-tex 'custom-loads '("cal-tex"))
|
||||
(put 'hi-lock-interactive-text-highlighting 'custom-loads '("hi-lock"))
|
||||
(put 'mail-hist 'custom-loads '("mail-hist"))
|
||||
(put 'gnus-article-emphasis 'custom-loads '("gnus-art"))
|
||||
(put 'dunnet 'custom-loads '("dunnet"))
|
||||
(put 'fortran 'custom-loads '("fortran"))
|
||||
(put 'eshell-script 'custom-loads '("em-script"))
|
||||
(put 'feedmail-header 'custom-loads '("feedmail"))
|
||||
(put 'reftex-table-of-contents-browser 'custom-loads '("reftex-vars"))
|
||||
(put 'mspools 'custom-loads '("mspools"))
|
||||
|
@ -38,6 +42,7 @@
|
|||
(put 'icon 'custom-loads '("icon"))
|
||||
(put 'nnmail-procmail 'custom-loads '("nnmail"))
|
||||
(put 'desktop 'custom-loads '("desktop"))
|
||||
(put 'eshell-cmpl 'custom-loads '("em-cmpl"))
|
||||
(put 'cperl-help-system 'custom-loads '("cperl-mode"))
|
||||
(put 'ps-print-miscellany 'custom-loads '("ps-print"))
|
||||
(put 'comint-completion 'custom-loads '("comint"))
|
||||
|
@ -75,6 +80,7 @@
|
|||
(put 'mpuz 'custom-loads '("mpuz"))
|
||||
(put 'find-file 'custom-loads '("files" "find-file"))
|
||||
(put 'fortran-comment 'custom-loads '("fortran"))
|
||||
(put 'idlwave-online-help 'custom-loads '("idlwave"))
|
||||
(put 'viper 'custom-loads '("viper-ex" "viper-init" "viper-keym" "viper-macs" "viper-mous" "viper"))
|
||||
(put 'ps-print-page 'custom-loads '("ps-print"))
|
||||
(put 'postscript 'custom-loads '("ps-print" "ebnf2ps"))
|
||||
|
@ -108,11 +114,13 @@
|
|||
(put 'feedmail 'custom-loads '("feedmail"))
|
||||
(put 'gnus-agent 'custom-loads '("gnus-agent"))
|
||||
(put 'message-news 'custom-loads '("message"))
|
||||
(put 'eshell 'custom-loads '("esh-arg" "esh-cmd" "esh-ext" "esh-io" "esh-mode" "esh-module" "esh-opt" "esh-proc" "esh-test" "esh-util" "esh-var" "eshell"))
|
||||
(put 'bib 'custom-loads '("bib-mode"))
|
||||
(put 'vhdl-align 'custom-loads '("vhdl-mode"))
|
||||
(put 'iswitchb 'custom-loads '("iswitchb"))
|
||||
(put 'custom-buffer 'custom-loads '("cus-edit"))
|
||||
(put 'vhdl-header 'custom-loads '("vhdl-mode"))
|
||||
(put 'eshell-cmd 'custom-loads '("esh-cmd"))
|
||||
(put 'tex-run 'custom-loads '("tex-mode"))
|
||||
(put 'reftex-finding-files 'custom-loads '("reftex-vars"))
|
||||
(put 'iso-acc 'custom-loads '("iso-acc"))
|
||||
|
@ -138,6 +146,7 @@
|
|||
(put 'speedbar-faces 'custom-loads '("speedbar" "vhdl-mode"))
|
||||
(put 'rmail 'custom-loads '("paths" "rmail" "undigest"))
|
||||
(put 'ps-print-n-up 'custom-loads '("ps-print"))
|
||||
(put 'eshell-arg 'custom-loads '("esh-arg"))
|
||||
(put 'ps-print-printer 'custom-loads '("ps-print"))
|
||||
(put 'message-various 'custom-loads '("message"))
|
||||
(put 'term 'custom-loads '("terminal" "term"))
|
||||
|
@ -165,6 +174,7 @@
|
|||
(put 'gnus-score 'custom-loads '("gnus-nocem" "gnus"))
|
||||
(put 'gnus-group-select 'custom-loads '("gnus-sum" "gnus"))
|
||||
(put 'archive-lzh 'custom-loads '("arc-mode"))
|
||||
(put 'eshell-prompt 'custom-loads '("em-prompt"))
|
||||
(put 'vhdl-sequential-process 'custom-loads '("vhdl-mode"))
|
||||
(put 'simula 'custom-loads '("simula"))
|
||||
(put 'bs-appearence 'custom-loads '("bs"))
|
||||
|
@ -174,6 +184,7 @@
|
|||
(put 'generic 'custom-loads '("generic-x" "generic"))
|
||||
(put 'docs 'custom-loads '("info" "makeinfo" "texinfo"))
|
||||
(put 'indent 'custom-loads '("indent"))
|
||||
(put 'eshell-alias 'custom-loads '("em-alias"))
|
||||
(put 'enriched 'custom-loads '("enriched"))
|
||||
(put 'gnus-threading 'custom-loads '("gnus-sum"))
|
||||
(put 'hide-ifdef 'custom-loads '("hideif"))
|
||||
|
@ -186,9 +197,10 @@
|
|||
(put 'idlwave-shell-initial-commands 'custom-loads '("idlw-shell"))
|
||||
(put 'tildify 'custom-loads '("tildify"))
|
||||
(put 'cperl-autoinsert-details 'custom-loads '("cperl-mode"))
|
||||
(put 'help 'custom-loads '("help" "apropos" "cus-edit" "help-macro" "info-look" "info" "man" "tooltip" "woman"))
|
||||
(put 'help 'custom-loads '("help-macro" "help" "apropos" "cus-edit" "info-look" "info" "man" "tooltip" "woman"))
|
||||
(put 'forms 'custom-loads '("forms"))
|
||||
(put 'widget-documentation 'custom-loads '("wid-edit"))
|
||||
(put 'eshell-banner 'custom-loads '("em-banner"))
|
||||
(put 'gnus-score-various 'custom-loads '("gnus-score" "gnus"))
|
||||
(put 'cperl-faces 'custom-loads '("cperl-mode"))
|
||||
(put 'goto-address 'custom-loads '("goto-addr"))
|
||||
|
@ -224,7 +236,9 @@
|
|||
(put 'mail-extr 'custom-loads '("mail-extr"))
|
||||
(put 'double 'custom-loads '("double"))
|
||||
(put 'imenu 'custom-loads '("imenu"))
|
||||
(put 'eshell-var 'custom-loads '("esh-var"))
|
||||
(put 'scribe 'custom-loads '("scribe"))
|
||||
(put 'eshell-smart 'custom-loads '("em-smart"))
|
||||
(put 'server 'custom-loads '("server"))
|
||||
(put 'idlwave-shell-highlighting-and-faces 'custom-loads '("idlw-shell"))
|
||||
(put 'tcl 'custom-loads '("tcl"))
|
||||
|
@ -242,6 +256,7 @@
|
|||
(put 'nnmail-duplicate 'custom-loads '("nnmail"))
|
||||
(put 'handwrite 'custom-loads '("handwrite"))
|
||||
(put 'tags 'custom-loads '("speedbar"))
|
||||
(put 'eshell-proc 'custom-loads '("esh-proc"))
|
||||
(put 'custom-browse 'custom-loads '("cus-edit"))
|
||||
(put 'generic-x 'custom-loads '("generic-x"))
|
||||
(put 'partial-completion 'custom-loads '("complete"))
|
||||
|
@ -270,20 +285,23 @@
|
|||
(put 'ebnf-optimization 'custom-loads '("ebnf2ps"))
|
||||
(put 'apropos 'custom-loads '("apropos"))
|
||||
(put 'gomoku 'custom-loads '("gomoku"))
|
||||
(put 'eshell-pred 'custom-loads '("em-pred"))
|
||||
(put 'tools 'custom-loads '("add-log" "calculator" "compare-w" "diff-mode" "diff" "ediff" "elide-head" "emerge" "gud" "pcvs-defs" "smerge-mode" "speedbar" "tempo" "tooltip" "vc" "which-func" "copyright" "compile" "ebrowse" "etags" "glasses" "make-mode" "rcompile"))
|
||||
(put 'gnus-topic 'custom-loads '("gnus-topic"))
|
||||
(put 'sgml 'custom-loads '("sgml-mode"))
|
||||
(put 'keyboard 'custom-loads '("simple" "chistory" "type-break"))
|
||||
(put 'eshell-hist 'custom-loads '("em-hist"))
|
||||
(put 'viper-mouse 'custom-loads '("viper-mous"))
|
||||
(put 'ps-print-horizontal 'custom-loads '("ps-print"))
|
||||
(put 'woman 'custom-loads '("woman"))
|
||||
(put 'decipher 'custom-loads '("decipher"))
|
||||
(put 'pcmpl-gnu 'custom-loads '("pcmpl-gnu"))
|
||||
(put 'ps-print-face 'custom-loads '("ps-print"))
|
||||
(put 'rmail-summary 'custom-loads '("rmail" "rmailsum"))
|
||||
(put 'metamail 'custom-loads '("metamail"))
|
||||
(put 'winner 'custom-loads '("winner"))
|
||||
(put 'ebrowse-faces 'custom-loads '("ebrowse"))
|
||||
(put 'wp 'custom-loads '("cus-edit" "enriched" "lpr" "ps-print" "view" "ebnf2ps" "bib-mode" "nroff-mode" "refbib" "refer" "scribe" "tildify"))
|
||||
(put 'wp 'custom-loads '("view" "cus-edit" "enriched" "lpr" "ps-print" "ebnf2ps" "bib-mode" "nroff-mode" "refbib" "refer" "scribe" "tildify"))
|
||||
(put 'reftex-citation-support 'custom-loads '("reftex-vars"))
|
||||
(put 'gnus-summary-choose 'custom-loads '("gnus-sum"))
|
||||
(put 'widget-browse 'custom-loads '("wid-browse"))
|
||||
|
@ -295,7 +313,7 @@
|
|||
(put 'vhdl-highlight-faces 'custom-loads '("vhdl-mode"))
|
||||
(put 'which-func 'custom-loads '("which-func"))
|
||||
(put 'pc-select 'custom-loads '("pc-select"))
|
||||
(put 'i18n 'custom-loads '("cus-edit" "double" "ccl" "iso-acc" "iso-ascii" "ogonek"))
|
||||
(put 'i18n 'custom-loads '("ccl" "cus-edit" "double" "iso-acc" "iso-ascii" "ogonek"))
|
||||
(put 'sh 'custom-loads '("sh-script"))
|
||||
(put 'message-headers 'custom-loads '("message"))
|
||||
(put 'idlwave-code-formatting 'custom-loads '("idlwave"))
|
||||
|
@ -327,11 +345,13 @@
|
|||
(put 'gnus-duplicate 'custom-loads '("gnus-dup"))
|
||||
(put 'find-function 'custom-loads '("find-func"))
|
||||
(put 'menu 'custom-loads '("faces" "tmm" "easymenu"))
|
||||
(put 'eshell-test 'custom-loads '("esh-test"))
|
||||
(put 'vhdl-highlight 'custom-loads '("vhdl-mode"))
|
||||
(put 'widgets 'custom-loads '("wid-browse" "wid-edit"))
|
||||
(put 'log-view 'custom-loads '("log-view"))
|
||||
(put 'PostScript 'custom-loads '("ps-mode"))
|
||||
(put 'abbrev-mode 'custom-loads '("abbrev" "cus-edit" "mailabbrev"))
|
||||
(put 'eshell-term 'custom-loads '("em-term"))
|
||||
(put 'earcon 'custom-loads '("earcon"))
|
||||
(put 'feedmail-headers 'custom-loads '("feedmail"))
|
||||
(put 'hypermedia 'custom-loads '("wid-edit" "metamail" "browse-url" "goto-addr"))
|
||||
|
@ -354,6 +374,8 @@
|
|||
(put 'change-log 'custom-loads '("add-log"))
|
||||
(put 'gnus-group-levels 'custom-loads '("gnus-group" "gnus-start" "gnus"))
|
||||
(put 'cperl 'custom-loads '("cperl-mode"))
|
||||
(put 'pcmpl-cvs 'custom-loads '("pcmpl-cvs"))
|
||||
(put 'eshell-mode 'custom-loads '("esh-mode"))
|
||||
(put 'files 'custom-loads '("files" "autoinsert" "autorevert" "cus-edit" "filecache" "recentf" "shadow" "ange-ftp"))
|
||||
(put 'pcl-cvs 'custom-loads '("cvs-status" "log-edit" "log-view" "pcvs-defs" "pcvs-info" "pcvs-parse" "pcvs"))
|
||||
(put 'rmail-files 'custom-loads '("rmail"))
|
||||
|
@ -381,6 +403,7 @@
|
|||
(put 'ispell 'custom-loads '("ispell"))
|
||||
(put 'auto-revert 'custom-loads '("autorevert"))
|
||||
(put 'advice 'custom-loads '("advice"))
|
||||
(put 'eshell-util 'custom-loads '("esh-util"))
|
||||
(put 'picture 'custom-loads '("picture"))
|
||||
(put 'gnus-group 'custom-loads '("gnus-topic" "gnus"))
|
||||
(put 'eudc-bbdb 'custom-loads '("eudc-vars"))
|
||||
|
@ -411,16 +434,19 @@
|
|||
(put 'modeline 'custom-loads '("faces" "time"))
|
||||
(put 'archive-zoo 'custom-loads '("arc-mode"))
|
||||
(put 'gnus-group-level 'custom-loads '("gnus"))
|
||||
(put 'idlwave-completion 'custom-loads '("idlwave"))
|
||||
(put 'eshell-rebind 'custom-loads '("em-rebind"))
|
||||
(put 'bibtex 'custom-loads '("bibtex"))
|
||||
(put 'faces 'custom-loads '("faces" "facemenu" "cus-edit" "font-lock" "hilit-chg" "paren" "ps-print" "speedbar" "time" "wid-edit" "woman" "gnus" "message" "cwarn" "make-mode"))
|
||||
(put 'faces 'custom-loads '("faces" "facemenu" "cus-edit" "font-lock" "loaddefs" "hilit-chg" "paren" "ps-print" "speedbar" "time" "wid-edit" "woman" "gnus" "message" "cwarn" "make-mode"))
|
||||
(put 'gnus-summary-various 'custom-loads '("gnus-sum"))
|
||||
(put 'applications 'custom-loads '("calendar" "cus-edit" "uniquify" "spell"))
|
||||
(put 'applications 'custom-loads '("calendar" "cus-edit" "uniquify" "spell" "eshell"))
|
||||
(put 'ebrowse-member 'custom-loads '("ebrowse"))
|
||||
(put 'terminal 'custom-loads '("terminal"))
|
||||
(put 'shadow 'custom-loads '("shadowfile" "shadow"))
|
||||
(put 'hl-line 'custom-loads '("hl-line"))
|
||||
(put 'eshell-glob 'custom-loads '("em-glob"))
|
||||
(put 'internal 'custom-loads '("startup" "cus-edit"))
|
||||
(put 'lisp 'custom-loads '("simple" "lisp" "lisp-mode" "cmuscheme" "ielm" "xscheme" "advice" "bytecomp" "checkdoc" "cl-indent" "cust-print" "edebug" "elp" "find-func" "pp" "re-builder" "shadow" "trace" "scheme"))
|
||||
(put 'lisp 'custom-loads '("simple" "lisp" "lisp-mode" "cmuscheme" "ielm" "xscheme" "advice" "bytecomp" "checkdoc" "cl-indent" "cust-print" "edebug" "eldoc" "elp" "find-func" "pp" "re-builder" "shadow" "trace" "scheme"))
|
||||
(put 'local 'custom-loads '("calendar"))
|
||||
(put 'rlogin 'custom-loads '("rlogin"))
|
||||
(put 'debugger 'custom-loads '("debug"))
|
||||
|
@ -433,7 +459,7 @@
|
|||
(put 'message-sending 'custom-loads '("message"))
|
||||
(put 'archive-arc 'custom-loads '("arc-mode"))
|
||||
(put 'rmail-output 'custom-loads '("rmailout"))
|
||||
(put 'editing 'custom-loads '("simple" "indent" "paragraphs" "auto-show" "cus-edit" "faces" "outline" "hl-line" "hscroll" "vcursor" "view" "picture"))
|
||||
(put 'editing 'custom-loads '("simple" "view" "indent" "paragraphs" "auto-show" "cus-edit" "faces" "outline" "hl-line" "hscroll" "vcursor" "picture"))
|
||||
(put 'crisp 'custom-loads '("crisp"))
|
||||
(put 'nroff 'custom-loads '("nroff-mode"))
|
||||
(put 'executable 'custom-loads '("executable"))
|
||||
|
@ -441,6 +467,7 @@
|
|||
(put 'copyright 'custom-loads '("copyright"))
|
||||
(put 'bytecomp 'custom-loads '("bytecomp"))
|
||||
(put 'message-insertion 'custom-loads '("message"))
|
||||
(put 'pcmpl-unix 'custom-loads '("pcmpl-unix"))
|
||||
(put 'gnus-extract-post 'custom-loads '("gnus-uu"))
|
||||
(put 'reftex-viewing-cross-references 'custom-loads '("reftex-vars"))
|
||||
(put 'hanoi 'custom-loads '("hanoi"))
|
||||
|
@ -476,10 +503,12 @@
|
|||
(put 'uniquify 'custom-loads '("uniquify"))
|
||||
(put 'old-c++ 'custom-loads '("cplus-md"))
|
||||
(put 'ps-print-font 'custom-loads '("ps-mule" "ps-print"))
|
||||
(put 'eshell-basic 'custom-loads '("em-basic"))
|
||||
(put 'vhdl-misc 'custom-loads '("vhdl-mode"))
|
||||
(put 'dired-x 'custom-loads '("dired-x"))
|
||||
(put 'spook 'custom-loads '("spook"))
|
||||
(put 'tex-file 'custom-loads '("tex-mode"))
|
||||
(put 'eshell-dirs 'custom-loads '("em-dirs"))
|
||||
(put 'time-stamp 'custom-loads '("time-stamp"))
|
||||
(put 'todo 'custom-loads '("todo-mode"))
|
||||
(put 'ebnf-special 'custom-loads '("ebnf2ps"))
|
||||
|
@ -488,13 +517,13 @@
|
|||
(put 'gud 'custom-loads '("gud"))
|
||||
(put 'c-macro 'custom-loads '("cmacexp"))
|
||||
(put 'gnus-cache 'custom-loads '("gnus-cache" "gnus"))
|
||||
(put 'eshell-module 'custom-loads '("esh-groups" "esh-module"))
|
||||
(put 'gnus-extract 'custom-loads '("gnus" "gnus-uu"))
|
||||
(put 'quickurl 'custom-loads '("quickurl"))
|
||||
(put 'browse-url 'custom-loads '("browse-url"))
|
||||
(put 'cust-print 'custom-loads '("cust-print"))
|
||||
(put 'gnus-article 'custom-loads '("gnus-art" "gnus-cite"))
|
||||
(put 'fortran-indent 'custom-loads '("fortran"))
|
||||
(put 'idlwave-routine-info-and-completion 'custom-loads '("idlwave"))
|
||||
(put 'comment 'custom-loads '("newcomment"))
|
||||
(put 'hardware 'custom-loads '("battery"))
|
||||
(put 'edebug 'custom-loads '("edebug"))
|
||||
|
@ -510,18 +539,21 @@
|
|||
(put 'programming 'custom-loads '("cus-edit"))
|
||||
(put 'meta-font 'custom-loads '("meta-mode"))
|
||||
(put 'ps-print-zebra 'custom-loads '("ps-print"))
|
||||
(put 'eshell-unix 'custom-loads '("em-unix"))
|
||||
(put 'hi-lock-faces 'custom-loads '("hi-lock"))
|
||||
(put 'hideshow 'custom-loads '("hideshow"))
|
||||
(put 'viper-search 'custom-loads '("viper-init"))
|
||||
(put 'mule 'custom-loads '("mule-cmds"))
|
||||
(put 'mule 'custom-loads '("mule-cmds" "kkc"))
|
||||
(put 'glasses 'custom-loads '("glasses"))
|
||||
(put 'vhdl-style 'custom-loads '("vhdl-mode"))
|
||||
(put 'tempo 'custom-loads '("tempo"))
|
||||
(put 'c 'custom-loads '("tooltip" "cc-vars" "cmacexp" "cpp" "hideif"))
|
||||
(put 'nnmail-prepare 'custom-loads '("nnmail"))
|
||||
(put 'processes 'custom-loads '("comint" "cus-edit" "shell" "term" "metamail" "compile" "executable" "sql" "flyspell" "rcompile" "rlogin"))
|
||||
(put 'processes 'custom-loads '("comint" "cus-edit" "executable" "pcomplete" "shell" "term" "metamail" "compile" "sql" "flyspell" "rcompile" "rlogin"))
|
||||
(put 'ebnf2ps 'custom-loads '("ebnf2ps"))
|
||||
(put 'sendmail 'custom-loads '("sendmail"))
|
||||
(put 'gnus-article-signature 'custom-loads '("gnus-art"))
|
||||
(put 'eshell-ls 'custom-loads '("em-ls"))
|
||||
(put 'idlwave 'custom-loads '("idlw-shell" "idlwave"))
|
||||
(put 'viper-ex 'custom-loads '("viper-ex"))
|
||||
(put 'gulp 'custom-loads '("gulp"))
|
||||
|
@ -529,6 +561,7 @@
|
|||
(put 'find-dired 'custom-loads '("find-dired"))
|
||||
(put 'delphi 'custom-loads '("delphi"))
|
||||
(put 're-builder 'custom-loads '("re-builder"))
|
||||
(put 'eshell-io 'custom-loads '("esh-io"))
|
||||
(put 'killing 'custom-loads '("simple"))
|
||||
(put 'woman-interface 'custom-loads '("woman"))
|
||||
(put 'gnus-group-various 'custom-loads '("gnus-group" "gnus"))
|
||||
|
@ -589,8 +622,6 @@
|
|||
(custom-put-if-not 'input-mode-8-bit 'standard-value t)
|
||||
(custom-put-if-not 'elide-head 'custom-version "21.1")
|
||||
(custom-put-if-not 'elide-head 'group-documentation "Eliding copyright headers and the like in source files.")
|
||||
(custom-put-if-not 'flyspell 'custom-version "20.3")
|
||||
(custom-put-if-not 'flyspell 'group-documentation "Spellchecking on the fly.")
|
||||
(custom-put-if-not 'compilation-scroll-output 'custom-version "20.3")
|
||||
(custom-put-if-not 'compilation-scroll-output 'standard-value t)
|
||||
(custom-put-if-not 'vc-dired-recurse 'custom-version "20.3")
|
||||
|
@ -605,6 +636,8 @@
|
|||
(custom-put-if-not 'help-highlight-p 'standard-value t)
|
||||
(custom-put-if-not 'browse-url-mosaic-program 'custom-version "20.3")
|
||||
(custom-put-if-not 'browse-url-mosaic-program 'standard-value t)
|
||||
(custom-put-if-not 'sql-oracle-options 'custom-version "20.8")
|
||||
(custom-put-if-not 'sql-oracle-options 'standard-value t)
|
||||
(custom-put-if-not 'find-function-regexp 'custom-version "21.1")
|
||||
(custom-put-if-not 'find-function-regexp 'standard-value t)
|
||||
(custom-put-if-not 'vcursor-string 'custom-version "20.3")
|
||||
|
@ -617,6 +650,8 @@
|
|||
(custom-put-if-not 'browse-url-filename-alist 'standard-value t)
|
||||
(custom-put-if-not 'change-log-version-info-enabled 'custom-version "21.1")
|
||||
(custom-put-if-not 'change-log-version-info-enabled 'standard-value t)
|
||||
(custom-put-if-not 'sql-electric-stuff 'custom-version "20.8")
|
||||
(custom-put-if-not 'sql-electric-stuff 'standard-value t)
|
||||
(custom-put-if-not 'midnight 'custom-version "20.3")
|
||||
(custom-put-if-not 'midnight 'group-documentation "Run something every day at midnight.")
|
||||
(custom-put-if-not 'automatic-hscrolling 'custom-version "21.1")
|
||||
|
@ -651,6 +686,8 @@
|
|||
(custom-put-if-not 'diary-mail-days 'standard-value t)
|
||||
(custom-put-if-not 'diary-mail-addr 'custom-version "20.3")
|
||||
(custom-put-if-not 'diary-mail-addr 'standard-value t)
|
||||
(custom-put-if-not 'font-lock-support-mode 'custom-version "21.1")
|
||||
(custom-put-if-not 'font-lock-support-mode 'standard-value t)
|
||||
(custom-put-if-not 'compilation-error-screen-columns 'custom-version "20.4")
|
||||
(custom-put-if-not 'compilation-error-screen-columns 'standard-value t)
|
||||
(custom-put-if-not 'debugger-record-buffer 'custom-version "20.3")
|
||||
|
@ -695,6 +732,8 @@
|
|||
(custom-put-if-not 'cperl 'group-documentation "Major mode for editing Perl code.")
|
||||
(custom-put-if-not 'focus-follows-mouse 'custom-version "20.3")
|
||||
(custom-put-if-not 'focus-follows-mouse 'standard-value t)
|
||||
(custom-put-if-not 'pcl-cvs 'custom-version "21.1")
|
||||
(custom-put-if-not 'pcl-cvs 'group-documentation "Special support for the CVS versioning system.")
|
||||
(custom-put-if-not 'fortran-comment-line-start-skip 'custom-version "21.1")
|
||||
(custom-put-if-not 'fortran-comment-line-start-skip 'standard-value t)
|
||||
(custom-put-if-not 'checkdoc 'custom-version "20.3")
|
||||
|
@ -733,8 +772,6 @@
|
|||
(custom-put-if-not 'diary-unknown-time 'standard-value t)
|
||||
(custom-put-if-not 'browse-url-lynx-emacs-args 'custom-version "20.3")
|
||||
(custom-put-if-not 'browse-url-lynx-emacs-args 'standard-value t)
|
||||
(custom-put-if-not 'todo 'custom-version "21.1")
|
||||
(custom-put-if-not 'todo 'group-documentation "Maintain a list of todo items.")
|
||||
(custom-put-if-not 'tooltip 'custom-version "21.1")
|
||||
(custom-put-if-not 'tooltip 'group-documentation "Customization group for the `tooltip' package.")
|
||||
(custom-put-if-not 'quickurl 'custom-version "21.1")
|
||||
|
@ -770,7 +807,7 @@
|
|||
(custom-put-if-not 'eval-expression-print-level 'custom-version "21.1")
|
||||
(custom-put-if-not 'eval-expression-print-level 'standard-value t)
|
||||
|
||||
(defvar custom-versions-load-alist '(("20.3.3" "dos-vars") (21.1 "ange-ftp") ("20.4" "files" "sh-script" "help" "compile") ("21.1" "debug" "dabbrev" "files" "paths" "sgml-mode" "net-utils" "fortran" "etags" "cus-edit" "frame" "add-log" "find-func" "wid-edit" "simple") ("20.3" "desktop" "easymenu" "hscroll" "dabbrev" "ffap" "rmail" "paren" "mailabbrev" "frame" "uce" "mouse" "diary-lib" "sendmail" "debug" "hexl" "vcursor" "vc" "compile" "etags" "help" "browse-url" "add-log" "find-func" "vc-hooks" "cus-edit" "replace"))
|
||||
(defvar custom-versions-load-alist '(("20.3.3" "dos-vars") (21.1 "ange-ftp") ("20.4" "files" "sh-script" "help" "compile") ("20.8" "sql") ("21.1" "debug" "dabbrev" "files" "paths" "sgml-mode" "net-utils" "font-lock" "fortran" "etags" "cus-edit" "frame" "add-log" "find-func" "wid-edit" "simple") ("20.3" "desktop" "easymenu" "hscroll" "dabbrev" "ffap" "rmail" "paren" "mailabbrev" "frame" "uce" "mouse" "diary-lib" "sendmail" "debug" "hexl" "vcursor" "vc" "compile" "etags" "help" "browse-url" "add-log" "find-func" "vc-hooks" "cus-edit" "replace"))
|
||||
"For internal use by custom.")
|
||||
|
||||
(provide 'cus-load)
|
||||
|
|
518
lisp/hi-lock.el
Normal file
518
lisp/hi-lock.el
Normal file
|
@ -0,0 +1,518 @@
|
|||
;;; hi-lock.el --- Minor mode for interactive automatic highlighting.
|
||||
|
||||
;; Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: David M. Koppelman, koppel@ee.lsu.edu
|
||||
;; Keywords: faces, minor-mode, matching, display
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 2, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
;;; Commentary
|
||||
;;
|
||||
;; With the hi-lock commands text matching interactively entered
|
||||
;; regexp's can be highlighted. For example, `M-x highlight-regexp
|
||||
;; RET clearly RET RET' will highlight all occurrences of `clearly'
|
||||
;; using a yellow background face. New occurrences of `clearly' will
|
||||
;; be highlighted as they are typed. `M-x unhighlight-regexp RET'
|
||||
;; will remove the highlighting. Any existing face can be used for
|
||||
;; highlighting and a set of appropriate faces is provided. The
|
||||
;; regexps can be written into the current buffer in a form that will
|
||||
;; be recognized the next time the corresponding file is read.
|
||||
;;
|
||||
;; Applications:
|
||||
;;
|
||||
;; In program source code highlight a variable to quickly see all
|
||||
;; places it is modified or referenced:
|
||||
;; M-x highlight-regexp ground_contact_switches_closed RET RET
|
||||
;;
|
||||
;; In a shell or other buffer that is showing lots of program
|
||||
;; output, highlight the parts of the output you're interested in:
|
||||
;; M-x highlight-regexp Total execution time [0-9]+ RET hi-blue-b RET
|
||||
;;
|
||||
;; In buffers displaying tables, highlight the lines you're interested in:
|
||||
;; M-x highlight-lines-matching-regexp January 2000 RET hi-black-b RET
|
||||
;;
|
||||
;; When writing text, highlight personal cliches. This can be
|
||||
;; amusing.
|
||||
;; M-x highlight-regexp as can be seen RET RET
|
||||
;;
|
||||
;; Setup
|
||||
;;
|
||||
;; Put the following code in your .emacs file. This turns on
|
||||
;; hi-lock mode and adds an "Automatic Highlighting" entry
|
||||
;; to the edit menu.
|
||||
;;
|
||||
;; (hi-lock-mode 1)
|
||||
;;
|
||||
;; You might also want to bind the hi-lock commands to more
|
||||
;; finger-friendly sequences:
|
||||
|
||||
;; (define-key hi-lock-map "\C-z\C-h" 'highlight-lines-matching-regexp)
|
||||
;; (define-key hi-lock-map "\C-zi" 'hi-lock-find-patterns)
|
||||
;; (define-key hi-lock-map "\C-zh" 'highlight-regexp)
|
||||
;; (define-key hi-lock-map "\C-zr" 'unhighlight-regexp)
|
||||
;; (define-key hi-lock-map "\C-zb" 'hi-lock-write-interactive-patterns))
|
||||
|
||||
;; See the documentation for hi-lock-mode `C-h f hi-lock-mode' for
|
||||
;; additional instructions.
|
||||
|
||||
;; Sample file patterns:
|
||||
|
||||
; Hi-lock: (("^;;; .*" (0 (quote hi-black-hb) t)))
|
||||
; Hi-lock: ( ("make-variable-buffer-\\(local\\)" (0 font-lock-keyword-face)(1 'italic append)))))
|
||||
; Hi-lock: end
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'font-lock))
|
||||
|
||||
;;;###autoload
|
||||
(defgroup hi-lock-interactive-text-highlighting nil
|
||||
"Interactively add and remove font-lock patterns for highlighting text."
|
||||
:group 'faces)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom hi-lock-mode nil
|
||||
"Toggle hi-lock, for interactively adding font-lock text-highlighting patterns."
|
||||
:set (lambda (symbol value)
|
||||
(hi-lock-mode (or value 0)))
|
||||
:initialize 'custom-initialize-default
|
||||
:type 'boolean
|
||||
:group 'hi-lock-interactive-text-highlighting
|
||||
:require 'hi-lock)
|
||||
|
||||
(defcustom hi-lock-file-patterns-range 10000
|
||||
"Limit of search in a buffer for hi-lock patterns.
|
||||
When a file is visited and hi-lock mode is on patterns starting
|
||||
up to this limit are added to font-lock's patterns. See documentation
|
||||
of functions `hi-lock-mode' and `hi-lock-find-patterns'."
|
||||
:type 'integer
|
||||
:group 'hi-lock-interactive-text-highlighting)
|
||||
|
||||
(defcustom hi-lock-exclude-modes
|
||||
'(rmail-mode mime/viewer-mode gnus-article-mode)
|
||||
"List of major modes in which hi-lock will not run.
|
||||
For security reasons since font lock patterns can specify function
|
||||
calls."
|
||||
:type 'variable
|
||||
:group 'hi-lock-interactive-text-highlighting)
|
||||
|
||||
|
||||
(defgroup hi-lock-faces nil
|
||||
"Faces for hi-lock."
|
||||
:group 'hi-lock-interactive-text-highlighting)
|
||||
|
||||
(defface hi-yellow
|
||||
'((t (:background "yellow")))
|
||||
"Default face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-pink
|
||||
'((t (:background "pink")))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-green
|
||||
'((t (:background "green")))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-blue
|
||||
'((t (:background "light blue")))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-black-b
|
||||
'((t (:weight bold)))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-blue-b
|
||||
'((t (:weight bold :foreground "blue")))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-green-b
|
||||
'((t (:weight bold :foreground "green")))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-red-b
|
||||
'((t (:weight bold :foreground "red")))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defface hi-black-hb
|
||||
'((t (:weight bold :family "helv" :height 200)))
|
||||
"Face for hi-lock mode."
|
||||
:group 'hi-lock-faces)
|
||||
|
||||
(defvar hi-lock-file-patterns nil
|
||||
"Patterns found in file for hi-lock. Should not be changed.")
|
||||
|
||||
(defvar hi-lock-interactive-patterns nil
|
||||
"Patterns provided to hi-lock by user. Should not be changed.")
|
||||
|
||||
(defvar hi-lock-face-history
|
||||
(list "hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b"
|
||||
"hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb")
|
||||
"History list of faces for hi-lock interactive functions.")
|
||||
|
||||
;(dolist (f hi-lock-face-history) (unless (facep f) (error "%s not a face" f)))
|
||||
|
||||
(defvar hi-lock-regexp-history nil
|
||||
"History of regexps used for interactive fontification.")
|
||||
|
||||
(defvar hi-lock-file-patterns-prefix "Hi-lock"
|
||||
"Regexp for finding hi-lock patterns at top of file.")
|
||||
|
||||
(make-variable-buffer-local 'hi-lock-interactive-patterns)
|
||||
(put 'hi-lock-interactive-patterns 'permanent-local t)
|
||||
(make-variable-buffer-local 'hi-lock-regexp-history)
|
||||
(put 'hi-lock-regexp-history 'permanent-local t)
|
||||
(make-variable-buffer-local 'hi-lock-file-patterns)
|
||||
(put 'hi-lock-file-patterns 'permanent-local t)
|
||||
|
||||
(defvar hi-lock-menu (make-sparse-keymap "Hi Lock")
|
||||
"Menu for hi-lock mode.")
|
||||
|
||||
(define-key-after hi-lock-menu [highlight-regexp]
|
||||
'(menu-item "Highlight Regexp..." highlight-regexp
|
||||
:help "Highlight text matching PATTERN (a regexp)."))
|
||||
|
||||
(define-key-after hi-lock-menu [highlight-lines-matching-regexp]
|
||||
'(menu-item "Highlight Lines..." highlight-lines-matching-regexp
|
||||
:help "Highlight lines containing match of PATTERN (a regexp).."))
|
||||
|
||||
(define-key-after hi-lock-menu [unhighlight-regexp]
|
||||
'(menu-item "Remove Highlighting..." unhighlight-regexp
|
||||
:help "Remove previously entered highlighting pattern."
|
||||
:enable hi-lock-interactive-patterns))
|
||||
|
||||
(define-key-after hi-lock-menu [hi-lock-write-interactive-patterns]
|
||||
'(menu-item "Patterns to Buffer" hi-lock-write-interactive-patterns
|
||||
:help "Insert interactively added REGEXPs into buffer at point."
|
||||
:enable hi-lock-interactive-patterns))
|
||||
|
||||
(define-key-after hi-lock-menu [hi-lock-find-patterns]
|
||||
'(menu-item "Patterns from Buffer" hi-lock-find-patterns
|
||||
:help "Use patterns (if any) near top of buffer."))
|
||||
|
||||
(defvar hi-lock-map (make-sparse-keymap "Hi Lock")
|
||||
"Key map for hi-lock.")
|
||||
|
||||
(define-key hi-lock-map "\C-xwi" 'hi-lock-find-patterns)
|
||||
(define-key hi-lock-map "\C-xwl" 'highlight-lines-matching-regexp)
|
||||
(define-key hi-lock-map "\C-xwh" 'highlight-regexp)
|
||||
(define-key hi-lock-map "\C-xwr" 'unhighlight-regexp)
|
||||
(define-key hi-lock-map "\C-xwb" 'hi-lock-write-interactive-patterns)
|
||||
|
||||
(unless (assq 'hi-lock-mode minor-mode-map-alist)
|
||||
(setq minor-mode-map-alist (cons (cons 'hi-lock-mode hi-lock-map)
|
||||
minor-mode-map-alist)))
|
||||
|
||||
(unless (assq 'hi-lock-mode minor-mode-alist)
|
||||
(setq minor-mode-alist (cons '(hi-lock-mode " H") minor-mode-alist)))
|
||||
|
||||
|
||||
;; Visible Functions
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun hi-lock-mode (&optional arg)
|
||||
"Toggle minor mode for interactively adding font-lock highlighting patterns.
|
||||
|
||||
If ARG positive turn hi-lock on. Issuing a hi-lock command will also
|
||||
turn hi-lock on. When hi-lock turned on an \"Automatic Highlighting\"
|
||||
submenu is added to the \"Edit\" menu. The commands in the submenu,
|
||||
which can be called interactively, are:
|
||||
|
||||
\\[highlight-regexp] REGEXP FACE
|
||||
Highlight matches of pattern REGEXP in current buffer with FACE.
|
||||
|
||||
\\[highlight-lines-matching-regexp] REGEXP FACE
|
||||
Highlight lines containing matches of REGEXP in current buffer with FACE.
|
||||
|
||||
\\[unhighlight-regexp] REGEXP
|
||||
Remove highlighting on matches of REGEXP in current buffer.
|
||||
|
||||
\\[hi-lock-write-interactive-patterns]
|
||||
Write active REGEXPs into buffer as comments (if possible). They will
|
||||
be read the next time file is loaded or when the \\[hi-lock-find-patterns] command
|
||||
is issued. The inserted regexps are in the form of font lock keywords.
|
||||
(See `font-lock-keywords') They may be edited and re-loaded with \\[hi-lock-find-patterns],
|
||||
any valid `font-lock-keywords' form is acceptable.
|
||||
|
||||
\\[hi-lock-find-patterns]
|
||||
Re-read patterns stored in buffer (in the format produced by \\[hi-lock-write-interactive-patterns]).
|
||||
|
||||
When hi-lock is started and if the mode is not excluded, the
|
||||
beginning of the buffer is searched for lines of the form:
|
||||
Hi-lock: FOO
|
||||
where FOO is a list of patterns. These are added to the font lock keywords
|
||||
already present. The patterns must start before position (number
|
||||
of characters into buffer) `hi-lock-file-patterns-range'. Patterns
|
||||
will be read until
|
||||
Hi-lock: end
|
||||
is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'."
|
||||
(interactive)
|
||||
(let ((hi-lock-mode-prev hi-lock-mode))
|
||||
(setq hi-lock-mode
|
||||
(if (null arg) (not hi-lock-mode)
|
||||
(> (prefix-numeric-value arg) 0)))
|
||||
;; Turned on.
|
||||
(when (and (not hi-lock-mode-prev) hi-lock-mode)
|
||||
(if (not font-lock-mode) (turn-on-font-lock))
|
||||
(add-hook 'find-file-hooks 'hi-lock-find-file-hook)
|
||||
(add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook)
|
||||
(define-key-after menu-bar-edit-menu [hi-lock]
|
||||
(cons "Automatic Highlighting" hi-lock-menu))
|
||||
(hi-lock-find-patterns))
|
||||
;; Turned off.
|
||||
(when (and hi-lock-mode-prev (not hi-lock-mode))
|
||||
(font-lock-remove-keywords nil hi-lock-interactive-patterns)
|
||||
(font-lock-remove-keywords nil hi-lock-file-patterns)
|
||||
(setq hi-lock-interactive-patterns nil)
|
||||
(hi-lock-refontify)
|
||||
(define-key-after menu-bar-edit-menu [hi-lock] nil)
|
||||
(remove-hook 'find-file-hooks 'hi-lock-find-file-hook)
|
||||
(remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook))))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'highlight-lines-matching-regexp 'hi-lock-line-face-buffer)
|
||||
;;;###autoload
|
||||
(defun hi-lock-line-face-buffer (regexp &optional face)
|
||||
"Set face of all lines containing matches of REGEXP to FACE.
|
||||
|
||||
Interactively, prompt for REGEXP then FACE. Buffer-local history
|
||||
list maintained for regexps, global history maintained for faces.
|
||||
\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item.
|
||||
(See info node `Minibuffer History')"
|
||||
(interactive
|
||||
(list
|
||||
(hi-lock-regexp-okay
|
||||
(read-from-minibuffer "Regexp to highlight line: "
|
||||
(cons (or (car hi-lock-regexp-history) "") 1 )
|
||||
nil nil 'hi-lock-regexp-history))
|
||||
(hi-lock-read-face-name)))
|
||||
(unless hi-lock-mode (hi-lock-mode))
|
||||
(or (facep face) (setq face 'rwl-yellow))
|
||||
(hi-lock-set-pattern
|
||||
(list (concat "^.*" regexp ".*$") (list 0 (list 'quote face) t))))
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'highlight-regexp 'hi-lock-face-buffer)
|
||||
;;;###autoload
|
||||
(defun hi-lock-face-buffer (regexp &optional face)
|
||||
"Set face of all matches of REGEXP to FACE.
|
||||
|
||||
Interactively, prompt for REGEXP then FACE. Buffer-local history
|
||||
list maintained for regexps, global history maintained for faces.
|
||||
\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item.
|
||||
(See info node `Minibuffer History')"
|
||||
(interactive
|
||||
(list
|
||||
(hi-lock-regexp-okay
|
||||
(read-from-minibuffer "Regexp to highlight: "
|
||||
(cons (or (car hi-lock-regexp-history) "") 1 )
|
||||
nil nil 'hi-lock-regexp-history))
|
||||
(hi-lock-read-face-name)))
|
||||
(or (facep face) (setq face 'rwl-yellow))
|
||||
(unless hi-lock-mode (hi-lock-mode))
|
||||
(hi-lock-set-pattern (list regexp (list 0 (list 'quote face) t))))
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'unhighlight-regexp 'hi-lock-unface-buffer)
|
||||
;;;###autoload
|
||||
(defun hi-lock-unface-buffer (regexp)
|
||||
"Remove highlighting of matches to REGEXP set by hi-lock.
|
||||
|
||||
Interactively, prompt for REGEXP. Buffer-local history of inserted
|
||||
regexp's maintained. Will accept only regexps inserted by hi-lock
|
||||
interactive functions. (See `hi-lock-interactive-patterns')
|
||||
\\<minibuffer-local-must-match-map>Use \\[minibuffer-complete] to complete a partially typed regexp.
|
||||
(See info node `Minibuffer History'.)"
|
||||
(interactive
|
||||
(if (vectorp (this-command-keys))
|
||||
(x-popup-menu
|
||||
t
|
||||
(cons
|
||||
`keymap
|
||||
(cons "Select Pattern to Unhighlight"
|
||||
(mapcar (lambda (pattern)
|
||||
(list (car pattern)
|
||||
(format
|
||||
"%s (%s)" (car pattern)
|
||||
(symbol-name
|
||||
(car (cdr (car (cdr (car (cdr pattern))))))))
|
||||
(cons nil nil)
|
||||
(car pattern)))
|
||||
hi-lock-interactive-patterns))))
|
||||
(let ((history-list (mapcar (lambda (p) (car p))
|
||||
hi-lock-interactive-patterns)))
|
||||
(unless hi-lock-interactive-patterns
|
||||
(error "No highlighting to remove"))
|
||||
(list
|
||||
(completing-read "Regexp to unhighlight: "
|
||||
hi-lock-interactive-patterns t t
|
||||
(car (car hi-lock-interactive-patterns))
|
||||
(cons 'history-list 1))))))
|
||||
(let ((keyword (assoc regexp hi-lock-interactive-patterns)))
|
||||
(when keyword
|
||||
(font-lock-remove-keywords nil (list keyword))
|
||||
(setq hi-lock-interactive-patterns
|
||||
(delq keyword hi-lock-interactive-patterns))
|
||||
(hi-lock-refontify))))
|
||||
|
||||
;;;###autoload
|
||||
(defun hi-lock-write-interactive-patterns ()
|
||||
"Write interactively added patterns, if any, into buffer at point.
|
||||
|
||||
Interactively added patterns are those normally specified using
|
||||
`highlight-regexp' and `highlight-lines-matching-regexp'; they can
|
||||
be found in variable `hi-lock-interactive-patterns'."
|
||||
(interactive)
|
||||
(let ((prefix (format "%s %s:" (or comment-start "") "Hi-lock")))
|
||||
(when (> (+ (point) (length prefix)) hi-lock-file-patterns-range)
|
||||
(beep)
|
||||
(message
|
||||
"Warning, inserted keywords not close enough to top of file."))
|
||||
(mapcar
|
||||
(lambda (pattern)
|
||||
(insert (format "%s (%s) %s\n"
|
||||
prefix (prin1-to-string pattern) (or comment-end ""))))
|
||||
hi-lock-interactive-patterns)))
|
||||
|
||||
|
||||
;; Implementation Functions
|
||||
|
||||
(defun hi-lock-regexp-okay (regexp)
|
||||
"Return REGEXP if it appears suitable for a font-lock pattern.
|
||||
|
||||
Otherwise signal an error. A pattern that matches the null string is
|
||||
not suitable."
|
||||
(if (string-match regexp "")
|
||||
(error "Regexp cannot match an empty string")
|
||||
regexp))
|
||||
|
||||
(defun hi-lock-read-face-name ()
|
||||
"Read face name from minibuffer with completion and history."
|
||||
(intern (completing-read
|
||||
"Highlight using face: "
|
||||
obarray 'facep t
|
||||
(cons (car hi-lock-face-history)
|
||||
(let ((prefix
|
||||
(try-completion
|
||||
(substring (car hi-lock-face-history) 0 1)
|
||||
(mapcar (lambda (f) (cons f f))
|
||||
hi-lock-face-history))))
|
||||
(if (and (stringp prefix)
|
||||
(not (equal prefix (car hi-lock-face-history))))
|
||||
(length prefix) 0)))
|
||||
'(hi-lock-face-history . 0))))
|
||||
|
||||
(defun hi-lock-find-file-hook ()
|
||||
"Add hi-lock patterns, if present."
|
||||
(hi-lock-find-patterns))
|
||||
|
||||
(defun hi-lock-current-line (&optional end)
|
||||
"Return line number of line at point.
|
||||
Optional argument END is maximum excursion."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(1+ (count-lines 1 (or end (point))))))
|
||||
|
||||
(defun hi-lock-set-pattern (pattern)
|
||||
"Add PATTERN to list of interactively highlighted patterns and refontify."
|
||||
(hi-lock-set-patterns (list pattern)))
|
||||
|
||||
(defun hi-lock-set-patterns (patterns)
|
||||
"Add PATTERNS to list of interactively highlighted patterns and refontify.."
|
||||
(dolist (pattern patterns)
|
||||
(unless (member pattern hi-lock-interactive-patterns)
|
||||
(font-lock-add-keywords nil (list pattern))
|
||||
(add-to-list 'hi-lock-interactive-patterns pattern)))
|
||||
(hi-lock-refontify))
|
||||
|
||||
(defun hi-lock-set-file-patterns (patterns)
|
||||
"Replace file patterns list with PATTERNS and refontify."
|
||||
(font-lock-remove-keywords nil hi-lock-file-patterns)
|
||||
(setq hi-lock-file-patterns patterns)
|
||||
(font-lock-add-keywords nil hi-lock-file-patterns)
|
||||
(hi-lock-refontify))
|
||||
|
||||
(defun hi-lock-refontify ()
|
||||
"Unfontify then refontify buffer. Used when hi-lock patterns change."
|
||||
(interactive)
|
||||
(font-lock-unfontify-buffer)
|
||||
(cond
|
||||
(jit-lock-mode (jit-lock-fontify-buffer))
|
||||
;; Need a better way, since this assumes too much about lazy lock.
|
||||
(lazy-lock-mode
|
||||
(let ((windows (get-buffer-window-list (current-buffer) 'nomini t)))
|
||||
(while windows
|
||||
(lazy-lock-fontify-window (car windows))
|
||||
(setq windows (cdr windows)))))
|
||||
(t (font-lock-fontify-buffer))))
|
||||
|
||||
|
||||
(defun hi-lock-find-patterns ()
|
||||
"Find patterns in current buffer for hi-lock."
|
||||
(interactive)
|
||||
(unless (memq major-mode hi-lock-exclude-modes)
|
||||
(let ((all-patterns nil)
|
||||
(target-regexp (concat "\\<" hi-lock-file-patterns-prefix ":")))
|
||||
(save-excursion
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(re-search-forward target-regexp
|
||||
(+ (point) hi-lock-file-patterns-range) t)
|
||||
(beginning-of-line)
|
||||
(while
|
||||
(and
|
||||
(re-search-forward target-regexp (+ (point) 100) t)
|
||||
(not (looking-at "\\s-*end")))
|
||||
(let
|
||||
((patterns
|
||||
(condition-case nil
|
||||
(read (current-buffer))
|
||||
(error (message
|
||||
(format "Could not read expression at %d"
|
||||
(hi-lock-current-line))) nil))))
|
||||
(if patterns
|
||||
(setq all-patterns (append patterns all-patterns))))))
|
||||
(if (and (not hi-lock-mode) all-patterns)
|
||||
(hi-lock-mode 1))
|
||||
(if hi-lock-mode (hi-lock-set-file-patterns all-patterns))
|
||||
(if (interactive-p)
|
||||
(message (format "Hi-lock added %d patterns." (length all-patterns)))))))
|
||||
|
||||
(defun hi-lock-font-lock-hook ()
|
||||
"Add hi lock patterns to font-lock's."
|
||||
(when hi-lock-mode
|
||||
(font-lock-add-keywords nil hi-lock-file-patterns)
|
||||
(font-lock-add-keywords nil hi-lock-interactive-patterns)))
|
||||
|
||||
(provide 'hi-lock)
|
||||
|
||||
;;; hi-lock.el ends here
|
||||
|
||||
|
978
lisp/loaddefs.el
978
lisp/loaddefs.el
File diff suppressed because it is too large
Load diff
560
lisp/play/zone.el
Normal file
560
lisp/play/zone.el
Normal file
|
@ -0,0 +1,560 @@
|
|||
;;; zone.el --- idle display hacks
|
||||
|
||||
;; Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
|
||||
;;; Author: Victor Zandy <zandy@cs.wisc.edu>
|
||||
;;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
|
||||
;;; Keywords: games
|
||||
;;; Created: June 6, 1998
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 2, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;; Boston, MA 02111-1307, USA.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Don't zone out in front of Emacs! Try M-x zone.
|
||||
;; If it eventually irritates you, try M-x zone-leave-me-alone.
|
||||
|
||||
;; Bored by the zone pyrotechnics? Write your own! Add it to
|
||||
;; `zone-programs'.
|
||||
|
||||
;; WARNING: Not appropriate for Emacs sessions over modems or
|
||||
;; computers as slow as mine.
|
||||
|
||||
;; THANKS: Christopher Mayer, Scott Flinchbaugh, Rachel Kalmar,
|
||||
;; Max Froumentin.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'timer)
|
||||
(require 'tabify)
|
||||
(eval-when-compile (require 'cl))
|
||||
|
||||
(defvar zone-timer nil)
|
||||
|
||||
(defvar zone-idle 20
|
||||
"*Seconds to idle before zoning out.")
|
||||
|
||||
;; Vector of functions that zone out. `zone' will execute one of
|
||||
;; these functions, randomly chosen. The chosen function is invoked
|
||||
;; in the *zone* buffer, which contains the text of the selected
|
||||
;; window. If the function loops, it *must* periodically check and
|
||||
;; halt if `input-pending-p' is t (because quitting is disabled when
|
||||
;; Emacs idle timers are run).
|
||||
(defvar zone-programs [
|
||||
zone-pgm-jitter
|
||||
zone-pgm-putz-with-case
|
||||
zone-pgm-dissolve
|
||||
; zone-pgm-explode
|
||||
zone-pgm-whack-chars
|
||||
zone-pgm-rotate
|
||||
zone-pgm-rotate-LR-lockstep
|
||||
zone-pgm-rotate-RL-lockstep
|
||||
zone-pgm-rotate-LR-variable
|
||||
zone-pgm-rotate-RL-variable
|
||||
zone-pgm-drip
|
||||
zone-pgm-drip-fretfully
|
||||
zone-pgm-five-oclock-swan-dive
|
||||
zone-pgm-martini-swan-dive
|
||||
zone-pgm-paragraph-spaz
|
||||
zone-pgm-stress
|
||||
])
|
||||
|
||||
(defmacro zone-orig (&rest body)
|
||||
`(with-current-buffer (get 'zone 'orig-buffer)
|
||||
,@body))
|
||||
|
||||
;;;###autoload
|
||||
(defun zone ()
|
||||
"Zone out, completely."
|
||||
(interactive)
|
||||
(and (timerp zone-timer) (cancel-timer zone-timer))
|
||||
(setq zone-timer nil)
|
||||
(let ((f (and window-system (selected-frame)))
|
||||
(outbuf (get-buffer-create "*zone*"))
|
||||
(text (buffer-substring (window-start) (window-end)))
|
||||
(wp (1+ (- (window-point (selected-window))
|
||||
(window-start)))))
|
||||
(put 'zone 'orig-buffer (current-buffer))
|
||||
(set-buffer outbuf)
|
||||
(setq mode-name "Zone")
|
||||
(erase-buffer)
|
||||
(insert text)
|
||||
(switch-to-buffer outbuf)
|
||||
(setq buffer-undo-list t)
|
||||
(untabify (point-min) (point-max))
|
||||
(set-window-start (selected-window) (point-min))
|
||||
(set-window-point (selected-window) wp)
|
||||
(sit-for 0 500)
|
||||
(let ((pgm (elt zone-programs (random (length zone-programs))))
|
||||
(ct (and f (frame-parameter f 'cursor-type))))
|
||||
(when ct (modify-frame-parameters f '((cursor-type . (bar . 0)))))
|
||||
(condition-case nil
|
||||
(progn
|
||||
(message "Zoning... (%s)" pgm)
|
||||
(garbage-collect)
|
||||
(funcall pgm)
|
||||
(message "Zoning...sorry"))
|
||||
(error
|
||||
(while (not (input-pending-p))
|
||||
(message (format "We were zoning when we wrote %s..." pgm))
|
||||
(sit-for 3)
|
||||
(message "...here's hoping we didn't hose your buffer!")
|
||||
(sit-for 3)))
|
||||
(quit (ding) (message "Zoning...sorry")))
|
||||
(when ct (modify-frame-parameters f (list (cons 'cursor-type ct)))))
|
||||
(kill-buffer outbuf)
|
||||
(zone-when-idle zone-idle)))
|
||||
|
||||
;;;; Zone when idle, or not.
|
||||
|
||||
(defvar zone-timer nil
|
||||
"Timer that zone sets to triggle idle zoning out.
|
||||
If t, zone won't zone out.")
|
||||
|
||||
(defun zone-when-idle (secs)
|
||||
"Zone out when Emacs has been idle for SECS seconds."
|
||||
(interactive "nHow long before I start zoning (seconds): ")
|
||||
(or (<= secs 0)
|
||||
(eq zone-timer t)
|
||||
(timerp zone-timer)
|
||||
(setq zone-timer (run-with-idle-timer secs t 'zone))))
|
||||
|
||||
(defun zone-leave-me-alone ()
|
||||
"Don't zone out when Emacs is idle."
|
||||
(interactive)
|
||||
(and (timerp zone-timer) (cancel-timer zone-timer))
|
||||
(setq zone-timer t)
|
||||
(message "I won't zone out any more"))
|
||||
|
||||
|
||||
;;;; zone-pgm-jitter
|
||||
|
||||
(defun zone-shift-up ()
|
||||
(let* ((b (point))
|
||||
(e (progn
|
||||
(end-of-line)
|
||||
(if (looking-at "\n") (1+ (point)) (point))))
|
||||
(s (buffer-substring b e)))
|
||||
(delete-region b e)
|
||||
(goto-char (point-max))
|
||||
(insert s)))
|
||||
|
||||
(defun zone-shift-down ()
|
||||
(goto-char (point-max))
|
||||
(forward-line -1)
|
||||
(beginning-of-line)
|
||||
(let* ((b (point))
|
||||
(e (progn
|
||||
(end-of-line)
|
||||
(if (looking-at "\n") (1+ (point)) (point))))
|
||||
(s (buffer-substring b e)))
|
||||
(delete-region b e)
|
||||
(goto-char (point-min))
|
||||
(insert s)))
|
||||
|
||||
(defun zone-shift-left ()
|
||||
(while (not (eobp))
|
||||
(or (eolp)
|
||||
(let ((c (following-char)))
|
||||
(delete-char 1)
|
||||
(end-of-line)
|
||||
(insert c)))
|
||||
(forward-line 1)))
|
||||
|
||||
(defun zone-shift-right ()
|
||||
(while (not (eobp))
|
||||
(end-of-line)
|
||||
(or (bolp)
|
||||
(let ((c (preceding-char)))
|
||||
(delete-backward-char 1)
|
||||
(beginning-of-line)
|
||||
(insert c)))
|
||||
(forward-line 1)))
|
||||
|
||||
(defun zone-pgm-jitter ()
|
||||
(let ((ops [
|
||||
zone-shift-left
|
||||
zone-shift-left
|
||||
zone-shift-left
|
||||
zone-shift-left
|
||||
zone-shift-right
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-up
|
||||
]))
|
||||
(goto-char (point-min))
|
||||
(while (not (input-pending-p))
|
||||
(funcall (elt ops (random (length ops))))
|
||||
(goto-char (point-min))
|
||||
(sit-for 0 10))))
|
||||
|
||||
|
||||
;;;; zone-pgm-whack-chars
|
||||
|
||||
(defvar zone-wc-tbl
|
||||
(let ((tbl (make-string 128 ?x))
|
||||
(i 0))
|
||||
(while (< i 128)
|
||||
(aset tbl i i)
|
||||
(setq i (1+ i)))
|
||||
tbl))
|
||||
|
||||
(defun zone-pgm-whack-chars ()
|
||||
(let ((tbl (copy-sequence zone-wc-tbl)))
|
||||
(while (not (input-pending-p))
|
||||
(let ((i 48))
|
||||
(while (< i 122)
|
||||
(aset tbl i (+ 48 (random (- 123 48))))
|
||||
(setq i (1+ i)))
|
||||
(translate-region (point-min) (point-max) tbl)
|
||||
(sit-for 0 2)))))
|
||||
|
||||
|
||||
;;;; zone-pgm-dissolve
|
||||
|
||||
(defun zone-remove-text ()
|
||||
(let ((working t))
|
||||
(while working
|
||||
(setq working nil)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(if (looking-at "[^(){}\n\t ]")
|
||||
(let ((n (random 5)))
|
||||
(if (not (= n 0))
|
||||
(progn
|
||||
(setq working t)
|
||||
(forward-char 1))
|
||||
(delete-char 1)
|
||||
(insert " ")))
|
||||
(forward-char 1))))
|
||||
(sit-for 0 2))))
|
||||
|
||||
(defun zone-pgm-dissolve ()
|
||||
(zone-remove-text)
|
||||
(zone-pgm-jitter))
|
||||
|
||||
|
||||
;;;; zone-pgm-explode
|
||||
|
||||
(defun zone-exploding-remove ()
|
||||
(let ((i 0))
|
||||
(while (< i 20)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(if (looking-at "[^*\n\t ]")
|
||||
(let ((n (random 5)))
|
||||
(if (not (= n 0))
|
||||
(forward-char 1))
|
||||
(insert " ")))
|
||||
(forward-char 1)))
|
||||
(setq i (1+ i))
|
||||
(sit-for 0 2)))
|
||||
(zone-pgm-jitter))
|
||||
|
||||
(defun zone-pgm-explode ()
|
||||
(zone-exploding-remove)
|
||||
(zone-pgm-jitter))
|
||||
|
||||
|
||||
;;;; zone-pgm-putz-with-case
|
||||
|
||||
;; Faster than `zone-pgm-putz-with-case', but not as good: all
|
||||
;; instances of the same letter have the same case, which produces a
|
||||
;; less interesting effect than you might imagine.
|
||||
(defun zone-pgm-2nd-putz-with-case ()
|
||||
(let ((tbl (make-string 128 ?x))
|
||||
(i 0))
|
||||
(while (< i 128)
|
||||
(aset tbl i i)
|
||||
(setq i (1+ i)))
|
||||
(while (not (input-pending-p))
|
||||
(setq i ?a)
|
||||
(while (<= i ?z)
|
||||
(aset tbl i
|
||||
(if (zerop (random 5))
|
||||
(upcase i)
|
||||
(downcase i)))
|
||||
(setq i (+ i (1+ (random 5)))))
|
||||
(setq i ?A)
|
||||
(while (<= i ?z)
|
||||
(aset tbl i
|
||||
(if (zerop (random 5))
|
||||
(downcase i)
|
||||
(upcase i)))
|
||||
(setq i (+ i (1+ (random 5)))))
|
||||
(translate-region (point-min) (point-max) tbl)
|
||||
(sit-for 0 2))))
|
||||
|
||||
(defun zone-pgm-putz-with-case ()
|
||||
(goto-char (point-min))
|
||||
(while (not (input-pending-p))
|
||||
(let ((np (+ 2 (random 5)))
|
||||
(pm (point-max)))
|
||||
(while (< np pm)
|
||||
(goto-char np)
|
||||
(let ((prec (preceding-char))
|
||||
(props (text-properties-at (1- (point)))))
|
||||
(insert (if (zerop (random 2))
|
||||
(upcase prec)
|
||||
(downcase prec)))
|
||||
(set-text-properties (1- (point)) (point) props))
|
||||
(backward-char 2)
|
||||
(delete-char 1)
|
||||
(setq np (+ np (1+ (random 5))))))
|
||||
(goto-char (point-min))
|
||||
(sit-for 0 2)))
|
||||
|
||||
|
||||
;;;; zone-pgm-rotate
|
||||
|
||||
(defun zone-line-specs ()
|
||||
(let (ret)
|
||||
(save-excursion
|
||||
(goto-char (window-start))
|
||||
(while (< (point) (window-end))
|
||||
(when (looking-at "[\t ]*\\([^\n]+\\)")
|
||||
(setq ret (cons (cons (match-beginning 1) (match-end 1)) ret)))
|
||||
(forward-line 1)))
|
||||
ret))
|
||||
|
||||
(defun zone-pgm-rotate (&optional random-style)
|
||||
(let* ((specs (apply
|
||||
'vector
|
||||
(let (res)
|
||||
(mapcar (lambda (ent)
|
||||
(let* ((beg (car ent))
|
||||
(end (cdr ent))
|
||||
(amt (if random-style
|
||||
(funcall random-style)
|
||||
(- (random 7) 3))))
|
||||
(when (< (- end (abs amt)) beg)
|
||||
(setq amt (random (- end beg))))
|
||||
(unless (= 0 amt)
|
||||
(setq res
|
||||
(cons
|
||||
(vector amt beg (- end (abs amt)))
|
||||
res)))))
|
||||
(zone-line-specs))
|
||||
res)))
|
||||
(n (length specs))
|
||||
amt aamt cut paste txt i ent)
|
||||
(while (not (input-pending-p))
|
||||
(setq i 0)
|
||||
(while (< i n)
|
||||
(setq ent (aref specs i))
|
||||
(setq amt (aref ent 0) aamt (abs amt))
|
||||
(if (> 0 amt)
|
||||
(setq cut 1 paste 2)
|
||||
(setq cut 2 paste 1))
|
||||
(goto-char (aref ent cut))
|
||||
(setq txt (buffer-substring (point) (+ (point) aamt)))
|
||||
(delete-char aamt)
|
||||
(goto-char (aref ent paste))
|
||||
(insert txt)
|
||||
(setq i (1+ i)))
|
||||
(sit-for 0.04))))
|
||||
|
||||
(defun zone-pgm-rotate-LR-lockstep ()
|
||||
(zone-pgm-rotate (lambda () 1)))
|
||||
|
||||
(defun zone-pgm-rotate-RL-lockstep ()
|
||||
(zone-pgm-rotate (lambda () -1)))
|
||||
|
||||
(defun zone-pgm-rotate-LR-variable ()
|
||||
(zone-pgm-rotate (lambda () (1+ (random 3)))))
|
||||
|
||||
(defun zone-pgm-rotate-RL-variable ()
|
||||
(zone-pgm-rotate (lambda () (1- (- (random 3))))))
|
||||
|
||||
|
||||
;;;; zone-pgm-drip
|
||||
|
||||
(defun zone-cpos (pos)
|
||||
(buffer-substring pos (1+ pos)))
|
||||
|
||||
(defun zone-fret (pos)
|
||||
(let* ((case-fold-search nil)
|
||||
(c-string (zone-cpos pos))
|
||||
(hmm (cond
|
||||
((string-match "[a-z]" c-string) (upcase c-string))
|
||||
((string-match "[A-Z]" c-string) (downcase c-string))
|
||||
(t " "))))
|
||||
(do ((i 0 (1+ i))
|
||||
(wait 0.5 (* wait 0.8)))
|
||||
((= i 20))
|
||||
(goto-char pos)
|
||||
(delete-char 1)
|
||||
(insert (if (= 0 (% i 2)) hmm c-string))
|
||||
(sit-for wait))
|
||||
(delete-char -1) (insert c-string)))
|
||||
|
||||
(defun zone-fall-through-ws (c col wend)
|
||||
(let ((fall-p nil) ; todo: move outward
|
||||
(wait 0.15)
|
||||
(o (point)) ; for terminals w/o cursor hiding
|
||||
(p (point)))
|
||||
(while (progn
|
||||
(forward-line 1)
|
||||
(move-to-column col)
|
||||
(looking-at " "))
|
||||
(setq fall-p t)
|
||||
(delete-char 1)
|
||||
(insert (if (< (point) wend) c " "))
|
||||
(save-excursion
|
||||
(goto-char p)
|
||||
(delete-char 1)
|
||||
(insert " ")
|
||||
(goto-char o)
|
||||
(sit-for (setq wait (* wait 0.8))))
|
||||
(setq p (1- (point))))
|
||||
fall-p))
|
||||
|
||||
(defun zone-pgm-drip (&optional fret-p pancake-p)
|
||||
(let* ((ww (1- (window-width)))
|
||||
(wh (window-height))
|
||||
(mc 0) ; miss count
|
||||
(total (* ww wh))
|
||||
(fall-p nil))
|
||||
(goto-char (point-min))
|
||||
;; fill out rectangular ws block
|
||||
(while (not (eobp))
|
||||
(end-of-line)
|
||||
(let ((cc (current-column)))
|
||||
(if (< cc ww)
|
||||
(insert (make-string (- ww cc) ? ))
|
||||
(delete-char (- ww cc))))
|
||||
(unless (eobp)
|
||||
(forward-char 1)))
|
||||
;; what the hell is going on here?
|
||||
(let ((nl (- wh (count-lines (point-min) (point)))))
|
||||
(when (> nl 0)
|
||||
(let ((line (concat (make-string (1- ww) ? ) "\n")))
|
||||
(do ((i 0 (1+ i)))
|
||||
((= i nl))
|
||||
(insert line)))))
|
||||
;;
|
||||
(catch 'done ; ugh
|
||||
(while (not (input-pending-p))
|
||||
(goto-char (point-min))
|
||||
(sit-for 0)
|
||||
(let ((wbeg (window-start))
|
||||
(wend (window-end)))
|
||||
(setq mc 0)
|
||||
;; select non-ws character, but don't miss too much
|
||||
(goto-char (+ wbeg (random (- wend wbeg))))
|
||||
(while (looking-at "[ \n\f]")
|
||||
(if (= total (setq mc (1+ mc)))
|
||||
(throw 'done 'sel)
|
||||
(goto-char (+ wbeg (random (- wend wbeg))))))
|
||||
;; character animation sequence
|
||||
(let ((p (point)))
|
||||
(when fret-p (zone-fret p))
|
||||
(goto-char p)
|
||||
(setq fall-p (zone-fall-through-ws
|
||||
(zone-cpos p) (current-column) wend))))
|
||||
;; assuming current-column has not changed...
|
||||
(when (and pancake-p
|
||||
fall-p
|
||||
(< (count-lines (point-min) (point))
|
||||
wh))
|
||||
(previous-line 1)
|
||||
(forward-char 1)
|
||||
(sit-for 0.137)
|
||||
(delete-char -1)
|
||||
(insert "@")
|
||||
(sit-for 0.137)
|
||||
(delete-char -1)
|
||||
(insert "*")
|
||||
(sit-for 0.137)
|
||||
(delete-char -1)
|
||||
(insert "_"))))))
|
||||
|
||||
(defun zone-pgm-drip-fretfully ()
|
||||
(zone-pgm-drip t))
|
||||
|
||||
(defun zone-pgm-five-oclock-swan-dive ()
|
||||
(zone-pgm-drip nil t))
|
||||
|
||||
(defun zone-pgm-martini-swan-dive ()
|
||||
(zone-pgm-drip t t))
|
||||
|
||||
|
||||
;;;; zone-pgm-paragraph-spaz
|
||||
|
||||
(defun zone-pgm-paragraph-spaz ()
|
||||
(if (memq (zone-orig major-mode) '(text-mode fundamental-mode))
|
||||
(let ((fill-column fill-column)
|
||||
(fc-min fill-column)
|
||||
(fc-max fill-column)
|
||||
(max-fc (1- (frame-width))))
|
||||
(while (sit-for 0.1)
|
||||
(fill-paragraph 1)
|
||||
(setq fill-column (+ fill-column (- (random 5) 2)))
|
||||
(when (< fill-column fc-min)
|
||||
(setq fc-min fill-column))
|
||||
(when (> fill-column max-fc)
|
||||
(setq fill-column max-fc))
|
||||
(when (> fill-column fc-max)
|
||||
(setq fc-max fill-column))))
|
||||
(message "Zoning... (zone-pgm-rotate)")
|
||||
(zone-pgm-rotate)))
|
||||
|
||||
|
||||
;;;; zone-pgm-stress
|
||||
|
||||
(defun zone-pgm-stress ()
|
||||
(goto-char (point-min))
|
||||
(let (lines bg m-fg m-bg)
|
||||
(while (< (point) (point-max))
|
||||
(let ((p (point)))
|
||||
(forward-line 1)
|
||||
(setq lines (cons (buffer-substring p (point)) lines))))
|
||||
(sit-for 5)
|
||||
(when window-system
|
||||
(setq bg (frame-parameter (selected-frame) 'background-color)
|
||||
m-fg (face-foreground 'modeline)
|
||||
m-bg (face-background 'modeline))
|
||||
(set-face-foreground 'modeline bg)
|
||||
(set-face-background 'modeline bg))
|
||||
(let ((msg "Zoning... (zone-pgm-stress)"))
|
||||
(while (not (string= msg ""))
|
||||
(message (setq msg (substring msg 1)))
|
||||
(sit-for 0.05)))
|
||||
(while (not (input-pending-p))
|
||||
(when (< 50 (random 100))
|
||||
(goto-char (point-max))
|
||||
(forward-line -1)
|
||||
(let ((kill-whole-line t))
|
||||
(kill-line))
|
||||
(goto-char (point-min))
|
||||
(insert (nth (random (length lines)) lines)))
|
||||
(message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr"))
|
||||
(sit-for 0.1))
|
||||
(when window-system
|
||||
(set-face-foreground 'modeline m-fg)
|
||||
(set-face-background 'modeline m-bg))))
|
||||
|
||||
(provide 'zone)
|
||||
|
||||
;;; zone.el ends here
|
||||
|
Loading…
Add table
Reference in a new issue