aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/auto-build/pd-extended-auto-builder.sh2
-rwxr-xr-xscripts/config-switcher.sh4
-rwxr-xr-xscripts/insert_declare.py5
-rw-r--r--scripts/pd-mode.el123
4 files changed, 16 insertions, 118 deletions
diff --git a/scripts/auto-build/pd-extended-auto-builder.sh b/scripts/auto-build/pd-extended-auto-builder.sh
index 723645fd..bb2535be 100755
--- a/scripts/auto-build/pd-extended-auto-builder.sh
+++ b/scripts/auto-build/pd-extended-auto-builder.sh
@@ -39,7 +39,7 @@ esac
cd "${SCRIPT_DIR}/../.."
auto_build_root_dir=`pwd`
echo "build root: $auto_build_root_dir"
-rsync_distro "$auto_build_root_dir"
+#rsync_distro "$auto_build_root_dir"
cd "${auto_build_root_dir}/packages/$BUILD_DIR"
make -C "${auto_build_root_dir}/packages" set_version
diff --git a/scripts/config-switcher.sh b/scripts/config-switcher.sh
index b8f29130..783dfaf2 100755
--- a/scripts/config-switcher.sh
+++ b/scripts/config-switcher.sh
@@ -53,11 +53,11 @@ else
case `uname` in
Darwin)
CONFIG_DIR=~/Library/Preferences
- CONFIG_FILE=org.puredata.pd.plist
+ CONFIG_FILE=org.puredata.pdextended.plist
;;
Linux)
CONFIG_DIR=~
- CONFIG_FILE=.pdsettings
+ CONFIG_FILE=.pdextended
;;
*)
echo "Not supported on this platform."
diff --git a/scripts/insert_declare.py b/scripts/insert_declare.py
index 472fb27f..15e0f58e 100755
--- a/scripts/insert_declare.py
+++ b/scripts/insert_declare.py
@@ -16,7 +16,7 @@ for root, dirs, files in os.walk('.'):
pass
# print "root: " + root
for name in files:
- m = re.search(".*-help\.pd$", name)
+ m = re.search(".*\.pd$", name)
if m:
helppatch = os.path.join(root, m.string)
fd = open(helppatch, 'r')
@@ -28,7 +28,8 @@ for root, dirs, files in os.walk('.'):
print helppatch
fd = open(helppatch, 'w')
fd.write(firstline)
- fd.write("#X declare -lib " + library.lower() + ";\n")
+# fd.write("#X declare -lib " + library.lower() + ";\n")
+ fd.write("#X declare -path ..;\n")
fd.writelines(contents)
fd.close()
diff --git a/scripts/pd-mode.el b/scripts/pd-mode.el
index d4a2e3b1..7fa29631 100644
--- a/scripts/pd-mode.el
+++ b/scripts/pd-mode.el
@@ -42,118 +42,15 @@
;;; Code:
;; Requires
-(require 'regexp-opt)
-
-
-;; Variables
-(defvar pd-mode-map nil
- "Keymap used for Pd file buffers")
-
-(defvar pd-mode-syntax-table nil
- "Pd file mode syntax table")
-
-(defvar pd-mode-hook nil
- "*List of hook functions run by `pd-mode' (see `run-hooks')")
-
-
-;; Font lock
-(defconst pd-font-lock-keywords
- (purecopy
- (list
- (list (concat ; object types
- "^#X \\("
- (regexp-opt '("connect" "floatatom" "msg" "obj" "scalar" "struct"
- "symbolatom" "text"))
- "\\) ")
- 1 'font-lock-type-face)
-
- (list (concat ; object types
- "\\(^#[NX] "
- (regexp-opt '("canvas" "restore"))
- "\\) ")
- 1 'font-lock-warning-face)
-
- ; connect numbers
- (list "^#X connect \\([0-9]+\\) [0-9]+ [0-9]+ [0-9]+"
- 1 'font-lock-variable-name-face)
- (list "^#X connect [0-9]+ \\([0-9]+\\) [0-9]+ [0-9]+"
- 1 'font-lock-function-name-face)
- (list "^#X connect [0-9]+ [0-9]+ \\([0-9]+\\) [0-9]+"
- 1 'font-lock-variable-name-face)
- (list "^#X connect [0-9]+ [0-9]+ [0-9]+ \\([0-9]+\\)"
- 1 'font-lock-function-name-face)
-
- ; x y coords
- (list "^#X [a-z]+ \\([0-9]+ [0-9]+\\) "
- 1 'font-lock-reference-face)
-
-; terminating semi-colon
- (list ";$" 0 'font-lock-warning-face t)
-
- (list "\\(^#X\\)" 0 'font-lock-builtin-face t)
-
-; (list "\\(^#N\\)" 0 'font-lock-constant-face t)
-
-; (list "^#N.*$" 0 'font-lock-comment-face t)
-
- (list "^#X obj [0-9]+ [0-9]+ \\([a-zA-Z0-9+*._-]+\\)[ ;]"
- 1 'font-lock-constant-face t)
-
- (list "^#X msg [0-9]+ [0-9]+ \\([a-zA-Z0-9+*._-]+\\);"
- 1 'font-lock-variable-name-face)
-
-; (list "^#X text [0-9]+ [0-9]+ \\(.*\\);"
-; 1 'font-lock-comment-face)
- ))
- "Expressions to highlight in Pd config buffers.")
-
-(put 'pd-mode 'font-lock-defaults '(pd-font-lock-keywords nil t
- ((?_ . "w")
- (?- . "w"))))
-;; Syntax table
-(if pd-mode-syntax-table
- nil
- (setq pd-mode-syntax-table (copy-syntax-table nil))
- (modify-syntax-entry ?_ "_" pd-mode-syntax-table)
- (modify-syntax-entry ?- "_" pd-mode-syntax-table)
- (modify-syntax-entry ?\( "(\)" pd-mode-syntax-table)
- (modify-syntax-entry ?\) ")\(" pd-mode-syntax-table)
- (modify-syntax-entry ?\< "(\>" pd-mode-syntax-table)
- (modify-syntax-entry ?\> ")\<" pd-mode-syntax-table)
- (modify-syntax-entry ?\" "\"" pd-mode-syntax-table))
-
-
-;;;###autoload
-(defun pd-mode ()
- "Major mode for editing Pd configuration files.
-
-\\{pd-mode-map}
-
-\\[pd-mode] runs the hook `pd-mode-hook'."
- (interactive)
- (kill-all-local-variables)
- (use-local-map pd-mode-map)
- (set-syntax-table pd-mode-syntax-table)
-
- (make-local-variable 'comment-start)
- (setq comment-start "#N ")
- (make-local-variable 'comment-start-skip)
- (setq comment-start-skip "#\\W*")
- (make-local-variable 'comment-column)
- (setq comment-column 48)
-
- ;;font-lock stuff (may not be initially necessary for XEmacs)
- (font-lock-mode 1)
- (setq font-lock-keywords pd-font-lock-keywords)
- (font-lock-fontify-buffer)
-
- (setq mode-name "Pd")
- (setq major-mode 'pd-mode)
-
- (run-hooks 'pd-mode-hook))
-
-
-;; Provides
-(provide 'pd-mode)
+(require 'generic-x)
+
+(define-generic-mode 'pd-mode
+ nil
+ '("osc~" "random" "route" "trigger")
+ '(("#X \\([^ ]+\\) " . 'font-lock-function-name-face)
+ (";" . 'font-lock-warning-face))
+ '(".pd\\'" ".pat\\'")
+ nil
+ "Major mode for editing Pd files")
;;; pd-mode.el ends here