Index: trunk/doc/misc/codeConventions.tex
===================================================================
--- trunk/doc/misc/codeConventions.tex	(revision 137)
+++ trunk/doc/misc/codeConventions.tex	(revision 138)
@@ -155,6 +155,6 @@
 Header files should have names starting \code{ps} or
 \code{p_ps} for private interface definitions. The latter
-should appear in a subdirectory \code{private} of whichever
-directory it being searched for the public header files.
+should appear in a subdirectory \code{Private} of whichever
+directory is being searched for the public header files.
 
 Include files should have the following order:
@@ -238,7 +238,10 @@
 \subsection{Line Length}
 
-Avoid lines longer than 80 characters, since they're not handled well by many terminals and tools.
-
-Note: Examples for use in documentation should have a shorter line length-generally no more than 70 characters.
+Avoid lines longer than 110 characters, since they're not handled well by many terminals and tools.
+
+When preparing documents, you should ensure that lines of this length
+are not wrapped (If you are using the standard PSDC \LaTeX{} class
+file \file{panstarrs.cls}, \CODE|\begin{verbatim} ... \end{verbatim}|
+will do this for you).
 
 \subsection{Wrapping Lines}
@@ -1395,4 +1398,8 @@
   High-precedence binary operators (\code{*}, \code{/}, \code{%} and above)
     should \emph{not} be surrounded by whitespace.
+
+\item
+  The line-length limit has been changed from 80 to 110 characters.
+
 \end{itemize}
 
@@ -1406,25 +1413,12 @@
 
 The easiest way to use these conventions while writing code using
-emacs is to add these lines to your \file{.emacs} file:
-
-\begin{verbatim}
-(define-derived-mode panstarrs-c-mode
-  c-mode "Pan-STARRS C"
-  "Major mode for editing Pan-STARRS C source.
-          \\{panstarrs-c-mode-map}"
-  
-  (setq c-default-style '((other . "k&r")))
-  (setq c-basic-offset 4)
-  (setq comment-column 40)
-  (add-to-list 'c-offsets-alist (cons 'statement-case-intro 2))
-  (add-to-list 'c-offsets-alist (cons 'statement-case-open 2))
-  (add-to-list 'c-offsets-alist (cons 'case-label 2))
-  )
-\end{verbatim}
-
-You then need to ensure that this mode is set when editing code;
-you could always type \code{ESCx panstarrs-c-mode} when you
-opened a file, but the simplest way is to add
-\begin{verbatim}
+emacs is to get \file{panstarrs.el} from \code{cvs} with the command
+\begin{verbatim}
+  cvs -d poiserver0.ifa.hawaii.edu:/usr/local/cvs/repositories/pan-starrs co Templates
+\end{verbatim}
+and then grab \file{Templates/panstarrs.el}.  Then add:
+
+\begin{verbatim}
+(load-file "/home/you/Templates/panstarrs.el")
 (add-to-list 'auto-mode-alist (cons "\\.[ch]$" 'panstarrs-c-mode))
 \end{verbatim}                          % $ % match that $ for emacs
@@ -1432,11 +1426,18 @@
 for all \file{.c} and \file{.h} files.
 
-If you want to use C99-style comments (i.e. \code{//} to end of line),
-add this to your \file{.emacs} file too:
-\begin{verbatim}
+If you want to
+\begin{itemize}
+  \item use C99-style comments (i.e. \code{//} to end of line)
+  \item have your emacs window set to 110 characters wide
+  \item somewhat improve (or spoil?) the handling of re-indenting comments
+\end{itemize}
+add one or more of these \code{add-hook} commands to your \file{.emacs} file too:
+\begin{verbatim}
+(add-hook 'panstarrs-c-mode-hook 'panstarrs-c99-comments)
+(add-hook 'panstarrs-c-mode-hook 'panstarrs-set-width)
 (add-hook 'panstarrs-c-mode-hook
-          '(lambda ()
-             (setq comment-start "// ")
-             (setq comment-end "")))
+	  '(lambda ()
+	     (set (make-variable-buffer-local 'comment-indent-function)
+		  'panstarrs-comment-indent)))
 \end{verbatim}
           
