This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script runs on login and on device hotplug and configures | |
# various bits of my Lenovo laptop. It automatically detects whether | |
# the machine is docked. | |
# Profiles: | |
# -1 = None | |
# 0 = legacy behavior: if thresh is 0, polynomial, | |
# otherwise, simple. | |
# 1 = device-dependent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cl) | |
(defun qtmstr-lisp-newline () | |
(when (save-excursion | |
(save-restriction | |
(narrow-to-region (point-min) (point)) | |
(beginning-of-line) | |
(looking-at "^\\( *;+ *\\)"))) | |
(let ((prefix (match-string 1))) | |
(delete-horizontal-space) |